Open mainstreet439 opened 6 years ago
originally noted as https://community.mapd.com/t/jdbc-driver-databasemetadata-gettables-method-returns-views-as-type-table/924
When you call DatabaseMetadata.getTables it will return a TABLE_TYPE of TABLE for views created in MAPD.
null,null,TABLE1,TABLE,null,null,null,null,null,null null,null,VIEW1,TABLE,null,null,null,null,null,null
Similarly, DatabaseMetadata.getTableTypes only returns TABLE as a type.
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTables-java.lang.String-java.lang.String-java.lang.String-java.lang.String:A-
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTableTypes--
Note https://github.com/mapd/mapd-core/commit/f3de0a6281795642e20efa60ca08d71dcf4c64d2, differentiating between tables & views without inefficient call to get table details, so possible fix path.
originally noted as https://community.mapd.com/t/jdbc-driver-databasemetadata-gettables-method-returns-views-as-type-table/924
When you call DatabaseMetadata.getTables it will return a TABLE_TYPE of TABLE for views created in MAPD.
null,null,TABLE1,TABLE,null,null,null,null,null,null null,null,VIEW1,TABLE,null,null,null,null,null,null
Similarly, DatabaseMetadata.getTableTypes only returns TABLE as a type.
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTables-java.lang.String-java.lang.String-java.lang.String-java.lang.String:A-
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTableTypes--