elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.2k stars 24.84k forks source link

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

Closed bpintea closed 4 years ago

bpintea commented 4 years ago

The current (c495d220ac8f) 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:

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 commented 4 years ago

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

bpintea commented 4 years ago

Closed in #54836.