SQL: fall back to using the field name for column label#38842
Merged
astefan merged 4 commits intoelastic:masterfrom Feb 14, 2019
Merged
SQL: fall back to using the field name for column label#38842astefan merged 4 commits intoelastic:masterfrom
astefan merged 4 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-search |
matriv
approved these changes
Feb 13, 2019
| new JdbcColumnInfo("test_keyword", EsType.KEYWORD, EMPTY, EMPTY, EMPTY, EMPTY, 0), | ||
| new JdbcColumnInfo("test_integer", EsType.INTEGER, EMPTY, EMPTY, EMPTY, EMPTY, 11), | ||
| new JdbcColumnInfo("test_double", EsType.DOUBLE, EMPTY, EMPTY, EMPTY, EMPTY, 25) | ||
| ); |
Contributor
There was a problem hiding this comment.
Please add an example like new JdbcColumnInfo("test_long", EsType.DOUBLE, EMPTY, EMPTY, EMPTY, "long", 25) to make clear that the label overrides the name.
Contributor
Author
There was a problem hiding this comment.
You're right. Extended the test. Thanks.
Contributor
Author
|
@elasticmachine run elasticsearch-ci/2 |
astefan
added a commit
that referenced
this pull request
Feb 14, 2019
(cherry picked from commit 0567bf2)
astefan
added a commit
that referenced
this pull request
Feb 14, 2019
(cherry picked from commit 0567bf2)
astefan
added a commit
that referenced
this pull request
Feb 14, 2019
(cherry picked from commit 0567bf2)
astefan
added a commit
that referenced
this pull request
Feb 14, 2019
(cherry picked from commit 0567bf2)
astefan
added a commit
to astefan/elasticsearch
that referenced
this pull request
Feb 14, 2019
(cherry picked from commit 0567bf2)
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Feb 14, 2019
* elastic/master: Remove immediate operation retry after mapping update (elastic#38873) Remove mentioning of types from bulk API docs (elastic#38896) SQL: change JDBC setup URL in the documentation (elastic#38564) Skip BWC tests in checkPart1 and checkPart2 (elastic#38730) Enable silent FollowersCheckerTest (elastic#38851) Update TESTING.asciidoc with platform specific instructions (elastic#38802) Use consistent view of realms for authentication (elastic#38815) Stabilize RareClusterState (elastic#38671) Increase Timeout in UnicastZenPingTests (elastic#38893) Do not recommend installing vagrant-winrm elastic#38887 _cat/indices with Security, hide names when wildcard (elastic#38824) SQL: fall back to using the field name for column label (elastic#38842) Fix LocalIndexFollowingIT#testRemoveRemoteConnection() test (elastic#38709) Remove joda time mentions in documentation (elastic#38720) Add enabled status for token and api key service (elastic#38687)
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 adds a simple fall back mechanism for the column label defined in ResultSetMetaData so that when asked for a column label we always return the field name.
This PR does not provide the complete implementation of the column label definition; this will be addressed in a follow up issue since it involves more changes internally in ES-SQL (we do not keep around both the original value and the alias of a field so we can use both in JDBC).
This should fix issues with libraries (Ruby's Sequel used in the Logstash
jdbcinput plugin) that use the column label to discover the names to be used in the results.Fixes #38831.