Steve Carlin has posted comments on this change. ( http://gerrit.cloudera.org:8080/21961 )
Change subject: IMPALA-13468: Fix various aggregation issues in aggregation.test ...................................................................... Patch Set 7: (6 comments) http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/FunctionResolver.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/FunctionResolver.java: http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/FunctionResolver.java@179 PS6, Line 179: if (lowercaseName.equals("grouping_id")) { > nit: toLowerCase seems redundant when the argument name is lowercaseName. Done http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/functions/FunctionResolver.java@181 PS6, Line 181: lowercaseName, impalaArgTypes, Type.BIGINT, true, false, true); > nit: this could be lowercaseName instead of repeating the literal string. M Done http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/CommonOperatorFunctions.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/CommonOperatorFunctions.java: http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/CommonOperatorFunctions.java@96 PS6, Line 96: List<RelDataType> operandTypes = new ArrayList<>(opBinding.getOperandCount()); > nit: could optimize by specifying the initial capacity Done http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/CommonOperatorFunctions.java@127 PS6, Line 127: // return true if any operand type is nullable. > I think this would be clearer if it said "return true if any operand types Done http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaAggOperator.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaAggOperator.java: http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaAggOperator.java@35 PS6, Line 35: * class or SqlKind. > Do they really match specific classes, rather than instanceof? Seems like a Not sure I understand the difference. An object would be an instanceof a class, so it's a specific class, no? Anyway, also edited the comment to include "SqlKind", which also matters. http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java File java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java: http://gerrit.cloudera.org:8080/#/c/21961/6/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java@a86 PS6, Line 86: > This seems to have mutated somewhat when it was moved to CommonOperatorFunc The only logical differences are: 1) No check for ExplicitOperatorBinding. I just couldn't figure out why I had it there to begin with. Nothing broke when removing it, so I did 2) I added an AggCallBinding because Agg specifically requires it. The other logic is the same, just slightly rewritten to be a little neater (in my opinion) -- To view, visit http://gerrit.cloudera.org:8080/21961 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I038127d6a2f228ae8d263e983b1906e99ae05f77 Gerrit-Change-Number: 21961 Gerrit-PatchSet: 7 Gerrit-Owner: Steve Carlin <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Anonymous Coward (816) Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Tue, 29 Oct 2024 20:53:24 +0000 Gerrit-HasComments: Yes
