Jason Fehr has posted comments on this change. ( http://gerrit.cloudera.org:8080/21142 )
Change subject: IMPALA-12737: Query columns in workload management tables. ...................................................................... Patch Set 57: (4 comments) http://gerrit.cloudera.org:8080/#/c/21142/56/be/src/workload_mgmt/workload-management-fields-test.cc File be/src/workload_mgmt/workload-management-fields-test.cc: http://gerrit.cloudera.org:8080/#/c/21142/56/be/src/workload_mgmt/workload-management-fields-test.cc@103 PS56, Line 103: : vector<FieldDefEntry> expected_field_defs = { : _createV100String(TQueryTableColumn::CLUSTER_ID), : _cr > What I meant before is to contain all tests cases in vector and loop them t The reason I went with incrementing an iterator is that the [] operator on maps takes a key, not an index. I re-wrote the test using an iterator for the map and an index variable for the list of expected values. I like the new code much better because it reduces duplication. http://gerrit.cloudera.org:8080/#/c/21142/56/be/src/workload_mgmt/workload-management-test.cc File be/src/workload_mgmt/workload-management-test.cc: http://gerrit.cloudera.org:8080/#/c/21142/56/be/src/workload_mgmt/workload-management-test.cc@26 PS56, Line 26: #include "kudu/util/version_util.h" > This is a weird pattern. I'd rather keep a public definition for GetTargetS I agree it's strange. It's also an anti-pattern to unit test private/internal methods. I refactored the code to remove the _getTargetSchemaVersion() function. http://gerrit.cloudera.org:8080/#/c/21142/56/fe/src/main/java/org/apache/impala/analysis/Analyzer.java File fe/src/main/java/org/apache/impala/analysis/Analyzer.java: http://gerrit.cloudera.org:8080/#/c/21142/56/fe/src/main/java/org/apache/impala/analysis/Analyzer.java@4602 PS56, Line 4602: Path}s ignoring any {@li > nit: "to dot delimited strings" Done. Re-wrote this description since it did not exactly document what the function did. http://gerrit.cloudera.org:8080/#/c/21142/55/tests/common/custom_cluster_test_suite.py File tests/common/custom_cluster_test_suite.py: http://gerrit.cloudera.org:8080/#/c/21142/55/tests/common/custom_cluster_test_suite.py@286 PS55, Line 286: assert not method.__dict__.get(EXPECT_STARTUP_FAIL, False), \ : "Expected cluster startup to fail, but startup succeeded." > It just my personal preference, I suppose. Python does not have semicolon t In situations like this, I seek to match existing patterns in the code base. The pattern is to use backslashes instead of parentheses, thus I prefer to stick with the code as-is. -- To view, visit http://gerrit.cloudera.org:8080/21142 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I78f3670b067c0c192ee8a212fba95466fbcb51d7 Gerrit-Change-Number: 21142 Gerrit-PatchSet: 57 Gerrit-Owner: Michael Smith <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Comment-Date: Thu, 24 Oct 2024 20:35:07 +0000 Gerrit-HasComments: Yes
