Skip to content
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 TYPES result ordering #30521

Closed
bpintea opened this issue May 10, 2018 · 1 comment
Closed

SQL: SYS TYPES result ordering #30521

bpintea opened this issue May 10, 2018 · 1 comment
Assignees

Comments

@bpintea
Copy link
Contributor

bpintea commented May 10, 2018

Elasticsearch version: master @ 65dbc17

ODBC specifies the order in which to return the supported data source types back to the application: the sort order [...] can be generalized as DATA_TYPE first, followed by TYPE_NAME, both ascending.

For the current data types returned, ordering by DATA_TYPE will be sufficient (the result is then also second degree ordered by TYPE_NAME).

FYI, the reason for ordering being that [m]ore than one SQL data type can map to a single type identifier, which can make it difficult (for the application) to determine which data type to use., so the ordering is supposed to also be done by how closely the data type maps to the corresponding ODBC SQL data type. This second criteria isn't necessarily applicable to our current set though (the example given is the definition of two integral types, one auto-incrementable, which would need to be ordered as second, since auto-incrementing property is not specific to an ODBC integral type).

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@costin costin closed this as completed in 2594c1f May 11, 2018
costin added a commit that referenced this issue May 11, 2018
Tweak the return data, in particular with regards for ODBC columns to
better align with the spec
Fix order for SYS TYPES and TABLES according to the JDBC/ODBC spec

Fix #30386
Fix #30521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants