amaliujia commented on a change in pull request #12110:
URL: https://github.com/apache/beam/pull/12110#discussion_r446681312
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/transform/BeamBuiltinAggregations.java
##########
@@ -393,29 +393,52 @@ public Long extractOutput(Long accum) {
}
}
- static class BitAnd<T extends Number> extends CombineFn<T, Long, Long> {
+ static class BitAnd<T extends Number> extends CombineFn<T, BitAnd.Accum,
Long> {
+ public static class Accum {
+ long val = -1L;
+ boolean isEmpty = true;
+ boolean seenNull = false;
+ }
+
@Override
- public Long createAccumulator() {
- return -1L;
Review comment:
why not still use Long, why change to Accum class?
----------------------------------------------------------------
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]