mirror of
https://github.com/apache/impala.git
synced 2026-01-24 06:00:49 -05:00
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. This is fixed by loading table types and comments along with table names from catalogd. The cached list of table names of a DB is changed to be a map containing the brief table metadata (name, type, comment). In case of stale types or comments in the list, when loading the msTable of a table, coordinator checks the type and comment and invalidates the table list if any of them are stale. Tests - Add tests in test_hs2.test_get_tables and manually test it in LocalCatalog mode. - Run CORE tests. Change-Id: I2180c603f061838347936f718cd4a0257d82e633 Reviewed-on: http://gerrit.cloudera.org:8080/15887 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>