Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/9096 )
Change subject: IMPALA-3916: Reserve SQL:2016 reserved words ...................................................................... Patch Set 3: (11 comments) http://gerrit.cloudera.org:8080/#/c/9096/3//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/9096/3//COMMIT_MSG@15 PS3, Line 15: reserve_impala3_words is added. It is true by default. update startup option http://gerrit.cloudera.org:8080/#/c/9096/3/be/src/util/backend-gflag-util.cc File be/src/util/backend-gflag-util.cc: http://gerrit.cloudera.org:8080/#/c/9096/3/be/src/util/backend-gflag-util.cc@81 PS3, Line 81: if (FLAGS_reserved_words_version == "IMPALA2.11") { We generally don't validate flags in this part of the code. Flag validation is more appropriate during startup, e.g., in ExecEnv::Init() or similar. How about we use a version string that is consistent with the IMPALA_BUILD_VERSION in version.cc? For example, "3.0.0" instead of "IMPALA3.0" http://gerrit.cloudera.org:8080/#/c/9096/3/common/thrift/BackendGflags.thrift File common/thrift/BackendGflags.thrift: http://gerrit.cloudera.org:8080/#/c/9096/3/common/thrift/BackendGflags.thrift@22 PS3, Line 22: IMPALA_2_11 indent 2 http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java File fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java: http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/java/org/apache/impala/catalog/BuiltinsDb.java@a59 PS3, Line 59: I like this and the associated changes, but they seem irrelevant to this patch. Let's separate this cleanup from the keywords-reservation change. http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java File fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java: http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java@a1412 PS3, Line 1412: Nice cleanup, but let's keep the changes minimal please and do the cleanup in a separate change. http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/jflex/sql-scanner.flex File fe/src/main/jflex/sql-scanner.flex: http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/jflex/sql-scanner.flex@59 PS3, Line 59: // - builtinFunctions - reservationExceptions This dynamic procedure doesn't seem right. It means we can eliminate a reserved word by introducing a built-in function with that name. For example, I think it's conceivable that we might want to introduce an "intersect" built-in function in the future and that should not break the INTERSECT SQL operator. I think INTERSECT should remain a keyword forever. http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/jflex/sql-scanner.flex@106 PS3, Line 106: static final HashSet<String> reservationExceptions = Add comment http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/main/jflex/sql-scanner.flex@357 PS3, Line 357: throw new IllegalStateException("Should not have gotten here."); Unhandled reserved words version: <print version string> http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java File fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java: http://gerrit.cloudera.org:8080/#/c/9096/3/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java@1219 PS3, Line 1219: TBackendGflags gflags = BackendConfig.INSTANCE.getBackendCfg(); Why? This will just cause merge conflicts http://gerrit.cloudera.org:8080/#/c/9096/3/tests/custom_cluster/test_stats_extrapolation.py File tests/custom_cluster/test_stats_extrapolation.py: http://gerrit.cloudera.org:8080/#/c/9096/3/tests/custom_cluster/test_stats_extrapolation.py@75 PS3, Line 75: empty_test_tbl = unique_database + ".`empty`" empty_tbl http://gerrit.cloudera.org:8080/#/c/9096/3/tests/query_test/test_sort.py File tests/query_test/test_sort.py: http://gerrit.cloudera.org:8080/#/c/9096/3/tests/query_test/test_sort.py@145 PS3, Line 145: select `empty`, l_orderkey, l_partkey, l_suppkey, empty_str -- To view, visit http://gerrit.cloudera.org:8080/9096 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If1b295e6a77e840cf1b794c2eb73e1b9d2b8ddd6 Gerrit-Change-Number: 9096 Gerrit-PatchSet: 3 Gerrit-Owner: Tianyi Wang <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Philip Zeyliger <[email protected]> Gerrit-Reviewer: Tianyi Wang <[email protected]> Gerrit-Comment-Date: Mon, 29 Jan 2018 22:17:44 +0000 Gerrit-HasComments: Yes
