SQL: drop BASE TABLE type in favour for just TABLE#54836
Merged
bpintea merged 6 commits intoelastic:masterfrom Apr 8, 2020
Merged
SQL: drop BASE TABLE type in favour for just TABLE#54836bpintea merged 6 commits intoelastic:masterfrom
bpintea merged 6 commits intoelastic:masterfrom
Conversation
This commit drops the table type 'BASE TABLE' and replaces all occurences with just 'TABLE', since his type is wider-used and friendlier to the client applications that query for certain table types in their discovery mode. The 'TABLE' type is also explicitely mentioned by the JDBC and ODBC standards and although other data source-specific types are permitted, older apps will not work well with them.
Update tests, rename 'BASE TABLE' to 'TABLE'.
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/bwc |
Contributor
Author
|
@elasticmachine update branch |
Collaborator
|
Pinging @elastic/es-ql (:Query Languages/SQL) |
costin
approved these changes
Apr 7, 2020
| UNKNOWN("UNKNOWN", "UNKNOWN"); | ||
|
|
||
| public static final String SQL_BASE_TABLE = "BASE TABLE"; | ||
| public static final String SQL_TABLE = "TABLE"; |
Member
There was a problem hiding this comment.
Since these constants are used somewhere else, it makes sense to move them outside IndexType and reuse them inside the enum declaration as well.
| executeCommand("SYS TABLES CATALOG LIKE '' LIKE '' ", r -> { | ||
| assertEquals(2, r.size()); | ||
| assertEquals("BASE TABLE", r.column(3)); | ||
| assertEquals(SQL_TABLE, r.column(3)); |
Move SQL_TABLE/_ALIAS out of IndexType, so that they can also be used in that Enum definition.
Contributor
Author
|
@elasticmachine run elasticsearch-ci/bwc elasticsearch-ci/2 |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/2 |
bpintea
added a commit
to bpintea/elasticsearch
that referenced
this pull request
Apr 8, 2020
* Drop BASE TABLE type in favour for just TABLE This commit drops the table type 'BASE TABLE' and replaces all occurences with just 'TABLE', since his type is wider-used and friendlier to the client applications that query for certain table types in their discovery mode. The 'TABLE' type is also explicitely mentioned by the JDBC and ODBC standards and although other data source-specific types are permitted, older apps will not work well with them. * Refactor table type constants out of IndexType Move SQL_TABLE/_ALIAS out of IndexType, so that they can also be used in that Enum definition. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 70241b5)
bpintea
added a commit
that referenced
this pull request
Apr 8, 2020
* Drop BASE TABLE type in favour for just TABLE This commit drops the table type 'BASE TABLE' and replaces all occurences with just 'TABLE', since his type is wider-used and friendlier to the client applications that query for certain table types in their discovery mode. The 'TABLE' type is also explicitely mentioned by the JDBC and ODBC standards and although other data source-specific types are permitted, older apps will not work well with them. * Refactor table type constants out of IndexType Move SQL_TABLE/_ALIAS out of IndexType, so that they can also be used in that Enum definition. (cherry picked from commit 70241b5)
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR drops the table type
BASE TABLEfor indices and replacesall occurrences with just
TABLE, since his type is widely-used andfriendlier to the client applications that query for certain table types
in their discovery mode.
The
TABLEtype is also explicitly mentioned by the JDBC and ODBCstandards and although other data source-specific types are permitted,
older apps will not work well with them.