-
Notifications
You must be signed in to change notification settings - Fork 25k
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
SQL: SYS TABLES adjustments for ODBC: TYPE argument #30398
Comments
Pinging @elastic/es-search-aggs |
|
After looking into msqry and delving through postgresql's and mysql's drivers, I've found out that actually So, here again, just as for point 2., we have the option of either changing the plugin implementation or handle this in the driver. For the record, both drivers "intercept" this argument and adapt it to the server. Also for the record, on their respective CLIs, both psql and mysql report the table types as The follow-up question would then be: besides the
OK, will take care of it there. |
Interesting. Do you know what the complete mapping of psql is? How do they handle |
Postresql's ODBC driver will only allow return results for In a setup where MS Query connects to MS SQL Server through FreeTDS (over the TDS protocol), the driver will not "intercept" the type parameter - as postgresql's one does -, but simply quote whatever tokens it receives, if they aren't quoted (so addressing the issue described in point 2 above). This is in line with postgresql behaviour too:
Note: My conclusion of this: in general, if an application needs to differentiate between the types of tables available into a data source, it would have to query the information schema "directly", via an explicit SELECT statement. As far as ODBC's SQLTables() is concerned, the specific type of table - The options I would see:
|
Issue described in .2 above addressed in bpintea/elasticsearch-sql-odbc@13f4883 |
Support TABLE as a legacy argument for SYS TABLE commands Fix #30398
Support TABLE as a legacy argument for SYS TABLE commands Fix elastic#30398
Elasticsearch version: master @ 65dbc17
With
TYPE
argument now working (as a fix for https://github.com/elastic/x-pack-elasticsearch/issues/4335), there are these two follow-up issues that have emerged:TABLE
as filter (like Microsoft Query:'TABLE','VIEW','SYNONYM'
). This will not matchBASE TABLE
and the result is empty. My proposal would be to make the two -BASE TABLE
andTABLE
- interchangeable for this query (even though they aren't, technically), unless we do actually differentiate between these two concepts.TYPE
parameter, ifnot an empty string, [it] must contain a list of comma-separated values for the types of interest; each value can be enclosed in single quotation marks (') or unquoted, for example, 'TABLE', 'VIEW' or TABLE, VIEW.
. Current ES/SQL implementation will accept the quoted list, but won't accept the unquoted format. I haven't yet encountered apps that make use of the unquoted format. The fix for this could obviously be implemented in the driver too -- up for discussion.The text was updated successfully, but these errors were encountered: