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

JDBC driver various issues with DatabaseMetadata and ResultsetMetadata interfaces #12

Open
mainstreet439 opened this issue Jan 6, 2018 · 0 comments

Comments

@mainstreet439
Copy link

As originally noted at https://community.mapd.com/t/jdbc-driver-various-issues-with-databasemetadata-and-resultsetmetadata-interfaces/891

There are various methods in the MAPD driver which are throwing exceptions re items not being supported. In various cases, why not just implement a method which does nothing and document the fact vs throwing exceptions. This saves an application having to write wrapper code for the MAPD driver to bypass/deal with the issues.

setting/getting fetch size
getting nativeSQL

Any method which could return an empty ResultSet instead if called:

DatabaseMetadata.getUDTs
DatabaseMetadata.getImportedKeys
DatabaseMetadata.getTablePrivileges
DatabaseMetadata.getColumnPrivileges
DatabaseMetadata.getProcedures
...

If Catalogs are not supported, current code should not be trying to call getSchemas internally

If schemas are not supported, unclear why getSchemas is implemented

ResultsetMetadata.getColumnClassName fails

ResultsetMetadata.getPrecision fails

Suggest the various calls to logger be removed as it seems like someones test/debug code
i.e

logger.info("Precision is " + ((TColumnType)this.sqlResult.row_set.row_desc.get(column - 1)).col_type.precision);
logger.info("TablePattern " + tableNamePattern + " columnNamePattern " + columnNamePattern);

@randyzwitch randyzwitch transferred this issue from heavyai/heavydb Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant