Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
Impala 2.2.4, Impala 2.3.0
Description
When fetching tables using HS2's GetTables endpoint, the TABLE_TYPE value returned by Impala for views and index tables is still "Table".
In contrast, Hive returns "VIEW" and "INDEX_TABLE".
Here's the problem, in MetadataOp.java:
for (int i = 0; i < dbsMetadata.dbs.size(); ++i) { String dbName = dbsMetadata.dbs.get(i); for (int j = 0; j < dbsMetadata.tableNames.get(i).size(); ++j) { String tabName = dbsMetadata.tableNames.get(i).get(j); TResultRow row = new TResultRow(); row.colVals = Lists.newArrayList(); row.colVals.add(EMPTY_COL_VAL); row.colVals.add(createTColumnValue(dbName)); row.colVals.add(createTColumnValue(tabName)); row.colVals.add(TABLE_TYPE_COL_VAL); // <<<<<<<<<< This is 'TABLE'. // TODO: Return table comments when it is available in the Impala catalog. row.colVals.add(EMPTY_COL_VAL); result.rows.add(row); } }
Attachments
Issue Links
- duplicates
-
IMPALA-1697 SHOW TABLES should also show type of table: table or view
- Resolved
- relates to
-
IMPALA-7587 Follow up for IMPALA-2636: consider fixing GetTables() for tables with not loaded metadata
- Open