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: Consider replacing exception with empty result sets in JDBC metadata #40533

Closed
costin opened this issue Mar 27, 2019 · 2 comments · Fixed by #40641
Closed

SQL: Consider replacing exception with empty result sets in JDBC metadata #40533

costin opened this issue Mar 27, 2019 · 2 comments · Fixed by #40641

Comments

@costin
Copy link
Member

costin commented Mar 27, 2019

Currently the JdbcDatabaseMetaData throws a SQLFeatureNotSupportedException for methods that are unsupported (such as getVersionColumns).
However these methods also return a ResultSet hence it is worth investigating whether returning an empty result set (with the appropriate column) is a better alternative as some clients might be able to handle them better (potentially eliminating existing warning inside the UI or logs).

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@costin
Copy link
Member Author

costin commented Mar 28, 2019

After running some tests I'm raising the importance of this to a bug as it improves the behavior of certain JDBC consumers significantly.

@colings86 colings86 added v6.7.2 and removed v6.7.1 labels Mar 30, 2019
costin added a commit to costin/elasticsearch that referenced this issue Apr 7, 2019
Changed the JDBC metadata to return empty results sets instead of
throwing SQLFeatureNotSupported as it seems a more safer/compatible
approach for consumers.

Fix elastic#40533
costin added a commit that referenced this issue Apr 8, 2019
Changed the JDBC metadata to return empty results sets instead of
throwing SQLFeatureNotSupported as it seems a more safer/compatible
approach for consumers.

Fix #40533
costin added a commit that referenced this issue Apr 8, 2019
Changed the JDBC metadata to return empty results sets instead of
throwing SQLFeatureNotSupported as it seems a more safer/compatible
approach for consumers.

Fix #40533

(cherry picked from commit ef2d252)
costin added a commit that referenced this issue Apr 8, 2019
Changed the JDBC metadata to return empty results sets instead of
throwing SQLFeatureNotSupported as it seems a more safer/compatible
approach for consumers.

Fix #40533

(cherry picked from commit ef2d252)
costin added a commit that referenced this issue Apr 8, 2019
Changed the JDBC metadata to return empty results sets instead of
throwing SQLFeatureNotSupported as it seems a more safer/compatible
approach for consumers.

Fix #40533

(cherry picked from commit ef2d252)
@polyfractal polyfractal added v7.0.1 and removed v7.0.0 labels Apr 9, 2019
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this issue May 27, 2019
Changed the JDBC metadata to return empty results sets instead of
throwing SQLFeatureNotSupported as it seems a more safer/compatible
approach for consumers.

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

Successfully merging a pull request may close this issue.

5 participants