wangxlong commented on a change in pull request #1676: [CALCITE-3591] Add
bit_xor aggregate function
URL: https://github.com/apache/calcite/pull/1676#discussion_r361161110
##########
File path:
core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
##########
@@ -1552,9 +1554,15 @@ public Expression implementResult(AggContext info,
Expression acc = add.accumulator().get(0);
Expression arg = add.arguments().get(0);
SqlAggFunction aggregation = info.aggregation();
- final Method method = (aggregation == BIT_AND
- ? BuiltInMethod.BIT_AND
- : BuiltInMethod.BIT_OR).method;
+
+ BuiltInMethod builtInMethod = BuiltInMethod.BIT_AND;
+ if (aggregation == BIT_OR) {
+ builtInMethod = BuiltInMethod.BIT_OR;
+ } else if (aggregation == BIT_XOR) {
+ builtInMethod = BuiltInMethod.BIT_XOR;
+ }
Review comment:
@danny0405 Thank you, I have updated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services