JDBC driver various issues with DatabaseMetadata and ResultsetMetadata interfaces


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


I already changed the driver to overcome the problems you are facing and trying with various products, like microstrategy, powerbi (with an obdc-jdbc bridge) and Microstrategy i got consistent results; i have to open a pull request to merge but i have to do some more tests with implementation of time/date methods with calendar.

If you need some specific methods implemented just ask


Hi, various things including:

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


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

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


Yes I removed the logging in resultset classes because they aren’t good for performance; I also implemented some of methods like get primary keys, foreign keys and so on returning an empty resultset as you suggested this summer to improve compatibility of driver for personal purpose;

I have to sort things out and do a pull request during holidays so I can share my code with the rest of community