You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling DatabaseMetadata.getColumns passing a pattern character for the table name returns an empty ResultSet. Meanwhile patterns in the column name will work.
Logic to check tablename is incorrect (if ((tableNamePattern == null) || (tableNamePattern.equals(tableName)))) vs column name check if ((columnNamePattern == null) || (value.col_name.matches(modifiedColumnPattern)))
The text was updated successfully, but these errors were encountered:
mainstreet439
changed the title
JDBC driver DatabaseMetadata.getColumns returns empty result set when pattern is specified
JDBC driver DatabaseMetadata.getColumns returns empty result set when pattern is specified for table name
Jan 6, 2018
Note related enhancement heavyai/heavydb#138. Good functional question is whether to also allow SQL-style pattern match in addition to or instead of regex. @niviksha
originally noted at https://community.mapd.com/t/jdbc-driver-databasemetadata-getcolumns-returns-empty-result-set-when-pattern-is-specified/925
MAPD version 3.3.1-20171108-32e7bcc
Calling DatabaseMetadata.getColumns passing a pattern character for the table name returns an empty ResultSet. Meanwhile patterns in the column name will work.
Logic to check tablename is incorrect (if ((tableNamePattern == null) || (tableNamePattern.equals(tableName)))) vs column name check if ((columnNamePattern == null) || (value.col_name.matches(modifiedColumnPattern)))
Returns 0 rows
ResultSet columns = dbMeta.getColumns( null, null, “%”, “%”);
ResultSet columns = dbMeta.getColumns( null, null, “T%”, “%”);
ResultSet columns = dbMeta.getColumns( null, null, "TLJA\_JP", "%");
Returns rows of table
ResultSet columns = dbMeta.getColumns( null, null, “TABLE1”, “%”);
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getColumns-java.lang.String-java.lang.String-java.lang.String-java.lang.String-
The text was updated successfully, but these errors were encountered: