Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20669 )
Change subject: IMPALA-3268: Add support for SHOW VIEWS statement ...................................................................... Patch Set 6: (10 comments) Overall LGTM. I just have some minor comments. http://gerrit.cloudera.org:8080/#/c/20669/6//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/20669/6//COMMIT_MSG@13 PS6, Line 13: catalog daemon nit: "catalog server" http://gerrit.cloudera.org:8080/#/c/20669/6//COMMIT_MSG@14 PS6, Line 14: '--pull_table_types_and_comments=true' Is this feature depends on this flag? I think if the views are loaded, they can be correctly shown. http://gerrit.cloudera.org:8080/#/c/20669/6/be/src/service/frontend.cc File be/src/service/frontend.cc: http://gerrit.cloudera.org:8080/#/c/20669/6/be/src/service/frontend.cc@199 PS6, Line 199: std:: nit: we don't need explicitly using the "std" namespace for std::string and std::set since they are declared in common/names.h http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/analysis/ShowViewsStmt.java File fe/src/main/java/org/apache/impala/analysis/ShowViewsStmt.java: http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/analysis/ShowViewsStmt.java@54 PS6, Line 54: new HashSet<>(Arrays.asList(TImpalaTableType.VIEW) nit: we can use com.google.common.collect.Sets directly as Sets.newHashSet(TImpalaTableType.VIEW) http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/Catalog.java File fe/src/main/java/org/apache/impala/catalog/Catalog.java: http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/Catalog.java@241 PS6, Line 241: new HashSet<>() nit: use Collections.emptySet() to avoid creating new objects. http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/Db.java File fe/src/main/java/org/apache/impala/catalog/Db.java: http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/Db.java@208 PS6, Line 208: new HashSet<>() nit: use Collections.emptySet() to avoid creating new objects. http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/Db.java@220 PS6, Line 220: tableTypes.stream().anyMatch(type -> table.getTableType().equals(type)) nit: This doesn't leverage the fact that 'tableTypes' is a set. I think it can be simpler: .filter(table -> tableTypes.contains(table.getTableType())) http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/local/LocalCatalog.java File fe/src/main/java/org/apache/impala/catalog/local/LocalCatalog.java: http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/local/LocalCatalog.java@124 PS6, Line 124: new HashSet<>() nit: use Collections.emptySet() to avoid creating new objects. http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/local/LocalDb.java File fe/src/main/java/org/apache/impala/catalog/local/LocalDb.java: http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/catalog/local/LocalDb.java@162 PS6, Line 162: new HashSet<>() nit: use Collections.emptySet() to avoid creating new objects. http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/service/Frontend.java File fe/src/main/java/org/apache/impala/service/Frontend.java: http://gerrit.cloudera.org:8080/#/c/20669/6/fe/src/main/java/org/apache/impala/service/Frontend.java@1141 PS6, Line 1141: new HashSet<>() nit: use Collections.emptySet() to avoid creating new objects. -- To view, visit http://gerrit.cloudera.org:8080/20669 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I321fc5350392a815949a4e7d2a64d60466689788 Gerrit-Change-Number: 20669 Gerrit-PatchSet: 6 Gerrit-Owner: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]> Gerrit-Comment-Date: Mon, 27 Nov 2023 06:01:56 +0000 Gerrit-HasComments: Yes
