Hao Hao has posted comments on this change. ( http://gerrit.cloudera.org:8080/14397 )
Change subject: IMPALA-9030: Handle translated external Kudu tables ...................................................................... Patch Set 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/14397/6/fe/src/main/java/org/apache/impala/service/KuduCatalogOpExecutor.java File fe/src/main/java/org/apache/impala/service/KuduCatalogOpExecutor.java: http://gerrit.cloudera.org:8080/#/c/14397/6/fe/src/main/java/org/apache/impala/service/KuduCatalogOpExecutor.java@75 PS6, Line 75: !KuduTable.isExternalTable(msTbl) > So this is interesting. Note that this method is implemented to create mana Hmm, it will be translated to 'Preconditions.checkState(KuduTable.isSynchronizedTable(msTbl))' instead of 'Preconditions.checkState(!KuduTable.isSynchronizedTable(msTbl))', right? So only the following should be allowed: create table foo (id int); create external table foo (id int) tblproperties ('external.purge.table' = 'false'); There are actually big differences between treating 'create table foo(id int) tblproperties ('external.purge.table'='true');` as external or synchronized: 1) creating external table has to have 'kudu.table_name' property specified. That means user can only do create external table foo (id int) tblproperties ('external.purge.table' = 'false', 'kudu.table_name' = 'my_kudu_table'); And Kudu table name will be the one specified by the user. 2) creating a synchronized table means a Kudu table will be created by Impala, while creating external table will not. Therefore, after pondering more, I think we should either block 'external.purge.table'='true' for Kudu tables as it conflicts with the definition of synchronized table. Then we can keep the current logic of checking for external table here. Or treat external + 'external.purge.table'='true' as managed table for table naming, and in analyzing create table statement (https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java#L255). And update to check for synchronized table here. I am good with either approach. -- To view, visit http://gerrit.cloudera.org:8080/14397 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I324523361c923b7d291cb4d0f1028b1a5b653b36 Gerrit-Change-Number: 14397 Gerrit-PatchSet: 6 Gerrit-Owner: Vihang Karajgaonkar <vih...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Greg Solovyev <gsolov...@cloudera.com> Gerrit-Reviewer: Hao Hao <hao....@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com> Gerrit-Reviewer: Vihang Karajgaonkar <vih...@cloudera.com> Gerrit-Comment-Date: Fri, 18 Oct 2019 00:20:09 +0000 Gerrit-HasComments: Yes