Quanlong Huang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/15887
Change subject: IMPALA-9669: Fix wrong table types for GET_TABLES in LocalCatalog ...................................................................... IMPALA-9669: Fix wrong table types for GET_TABLES in LocalCatalog Coordinator can be in two modes: legacy mode or LocalCatalog mode. Before IMPALA-8606, GET_TABLES required all tables to be loaded in LocalCatalog-mode coordinator’s cache, which is a performance regression compared to legacy mode coordinators. IMPALA-8606 changes the behavior to only load the table names and create LocalIncompleteTable for each table, which boosts the performance but results in all views being returned with the default table type (TABLE). Besides this, all returned comments are empty even if the table/view is loaded. This is a regression since in legacy coordinators, loaded tables/views are shown with correct table types and comments. In fact, if the hmsTable object of a table/view is loaded in local cache, we can extract its exact table type and comment. This patch fixes the problem by adding an additional lookup in the local cache for the table meta (hmsTable) of each table when creating the LocalIncompleteTables. When getting the table type and comment from a LocalIncompleteTable, use the loaded hmsTable. Tests - Add tests in test_hs2.test_get_tables - Run CORE tests Change-Id: I2180c603f061838347936f718cd4a0257d82e633 --- M fe/src/main/java/org/apache/impala/catalog/local/CatalogdMetaProvider.java M fe/src/main/java/org/apache/impala/catalog/local/DirectMetaProvider.java M fe/src/main/java/org/apache/impala/catalog/local/LocalDb.java M fe/src/main/java/org/apache/impala/catalog/local/LocalIncompleteTable.java M fe/src/main/java/org/apache/impala/catalog/local/MetaProvider.java M fe/src/main/java/org/apache/impala/service/MetadataOp.java M tests/hs2/test_hs2.py 7 files changed, 90 insertions(+), 30 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/87/15887/1 -- To view, visit http://gerrit.cloudera.org:8080/15887 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I2180c603f061838347936f718cd4a0257d82e633 Gerrit-Change-Number: 15887 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]>
