Skip to content

SQL: SYS TABLES to list indices as TABLE for internal clients #54671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bpintea opened this issue Apr 2, 2020 · 2 comments
Closed

SQL: SYS TABLES to list indices as TABLE for internal clients #54671

bpintea opened this issue Apr 2, 2020 · 2 comments
Assignees
Labels
:Analytics/SQL SQL querying Team:QL (Deprecated) Meta label for query languages team team-discuss

Comments

@bpintea
Copy link
Contributor

bpintea commented Apr 2, 2020

The current (c495d22) implementation will report the indices as BASE TABLE unless a legacy mode is enabled; this mode is triggered by a listing of the tables with a wildcard (%) TABLE type filter. In case this filter is absent, the listing will be done with the table type of BASE TABLE.

However:

  • the ODBC documentation requires the listing to always be TABLE (among other types), or a data source-specific type name (see the comments for the TABLE_TYPE columns).
  • the JDBC documentation for getTables() and getTableTypes() hint towards the same types as the ODBC docs.

While there is no obvious ODBC enforcement on the table type and more modern non-Microsoft applications will happily accept BASE TABLE, the older apps (ex.: SQL Server Integration Services' Linked Servers) and modern Microsoft ones (recent Excells, PowerBI) will not work with BASE TABLE, i.e. the "data source-specific type" tables are just ignored, not listed as available to the users.
Note that some of these "not-working" apps don't make use of the wildcard (i.e. use a NULL filter), neither specifically query for TABLE type, so the legacy mode is not triggered.

This proposal is to always enable the legacy mode for ODBC clients in the server (and potentially for JDBC too).

(This is a respin of the #30398 issue.)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-ql (:Query Languages/SQL)

@bpintea bpintea changed the title SQL: SYS TABLES to list indices as TABLES for internal clients SQL: SYS TABLES to list indices as TABLE for internal clients Apr 2, 2020
@bpintea bpintea self-assigned this Apr 2, 2020
@rjernst rjernst added the Team:QL (Deprecated) Meta label for query languages team label May 4, 2020
@bpintea
Copy link
Contributor Author

bpintea commented May 5, 2020

Closed in #54836.

@bpintea bpintea closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying Team:QL (Deprecated) Meta label for query languages team team-discuss
Projects
None yet
Development

No branches or pull requests

3 participants