Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/15887 )
Change subject: IMPALA-9669: Fix wrong table types for GET_TABLES in LocalCatalog ...................................................................... Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/15887/1/fe/src/main/java/org/apache/impala/service/MetadataOp.java File fe/src/main/java/org/apache/impala/service/MetadataOp.java: http://gerrit.cloudera.org:8080/#/c/15887/1/fe/src/main/java/org/apache/impala/service/MetadataOp.java@416 PS1, Line 416: Table msTbl = table.getMetaStoreTable(); > Is msTbl always guaranteed to be not null? No, for unloaded tables (i.e. IncompleteTable in catalog-v1, FailedLoadLocalTable and LocalIncompleteTable created with only db, table names in catalog-v2) it's null. http://gerrit.cloudera.org:8080/#/c/15887/1/fe/src/main/java/org/apache/impala/service/MetadataOp.java@419 PS1, Line 419: getOrDefault(tableTypeStr, TABLE_TYPE_TABLE) > It is concerning that we are defaulting to TABLE type here when in fact we Yeah, it's a bad default value but it's our current behavior... From the jdbc java doc [1], the typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM". It is not against returning a value like “UNKNOWN”. But I'm not sure whether clients will be broken and ignore tables in "UNKNOWN" type. Since this is a bug-fix patch, can we keep the current behavior? BTW, after IMPALA-9670, we should be able to show correct table types. [1] https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTables-java.lang.String-java.lang.String-java.lang.String-java.lang.String:A- -- 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: comment Gerrit-Change-Id: I2180c603f061838347936f718cd4a0257d82e633 Gerrit-Change-Number: 15887 Gerrit-PatchSet: 1 Gerrit-Owner: Quanlong Huang <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Vihang Karajgaonkar <[email protected]> Gerrit-Comment-Date: Tue, 12 May 2020 03:17:27 +0000 Gerrit-HasComments: Yes
