-
Notifications
You must be signed in to change notification settings - Fork 147
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
Hive and other dbs with non-standard DatabaseMetaData implementation support #183
Comments
I like the idea of wrapping DatabaseMetaData to mask errors. JDBC APIs tend to change from one version of Java to another, so a simple 'class DelegatingDatabaseMetaData implements DatabaseMetaData { ... }' may not work. I suggest that you write the wrapper using reflection and invocation handlers. How about adding a mode, say |
Yes I think it makes sense to use reflection here, thank you. I added property you mentioned Also there were added tests emulated hive's behavior and a separate test for wrapper. Current working with hive version |
I'm not totally comfortable with
|
yes, I do not have objections.
do not understand you here as before you mentioned
|
If you use a reflection proxy, the Java runtime will generate an implementation of If you want to expose additional functionality that is not in the |
Fixed in e2c67fe, PR #196; thanks @snuyanzin! |
The issue is that while trying to connect to hive (from HDP 2.6.5)
there are exceptions (full traces are below) like method not supported for
java.sql.DatabaseMetaData#supportsTransactionIsolationLevel
andjava.sql.DatabaseMetaData#storesUpperCaseIdentifiers
. At the same time javadoc fromjava.sql.DatabaseMetaData
says (for both)The proposal here is to wrap
DatabaseMetaData
and in case ofSQLFeatureNotSupportedException
or exception messageMethod not supported
use default behavior defined byjava.sql.DatabaseMetaData
instead of failure. BothSQLFeatureNotSupportedException
and exception messageMethod not supported
should be used as before and after https://issues.apache.org/jira/browse/HIVE-15730 the behavior is different.and
The text was updated successfully, but these errors were encountered: