second88 created DRILL-5836: ------------------------------- Summary: Incorrect order of columns returned from DatabaseMetaData.getSchemas() Key: DRILL-5836 URL: https://issues.apache.org/jira/browse/DRILL-5836 Project: Apache Drill Issue Type: Bug Components: Client - JDBC Affects Versions: 1.10.0 Reporter: second88 Priority: Minor
DatabaseMetaData.getSchemas() of a Drill JDBC connection returns ResultSet with columns (TABLE_CATALOG, TABLE_SCHEM) instead of (TABLE_SCHEM, TABLE_CATALOG). Please refer to [http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getSchemas()] for details. The potential root cause is that org.apache.drill.jdbc.impl.DrillMetaImpl.drillFieldMetaData(Class<?> clazz) relies on the order of the fields of clazz. In this case, clazz is oadd.org.apache.calcite.avatica.MetaImpl.MetaSchema but its fields tableCatalog comes first and tableSchem. As a result, (TABLE_CATALOG, TABLE_SCHEM) is returned. -- This message was sent by Atlassian JIRA (v6.4.14#64029)