ibzib commented on a change in pull request #13745:
URL: https://github.com/apache/beam/pull/13745#discussion_r556773587
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/transform/BeamBuiltinAggregations.java
##########
@@ -397,40 +397,54 @@ public Long extractOutput(Long accum) {
* <p>Note: null values are ignored when mixed with non-null values.
* (https://issues.apache.org/jira/browse/BEAM-10379)
*/
- static class BitAnd<T extends Number> extends CombineFn<T, Long, Long> {
- // Indicate if input only contains null value.
- private boolean isEmpty = true;
+ static class BitAnd<T extends Number> extends CombineFn<T, BitAnd.Accum,
Long> {
+ static class Accum {
+ /** True if no inputs have been seen yet. */
+ boolean isEmpty = true;
Review comment:
If isNull is true, the other values become meaningless. I added a
comment.
----------------------------------------------------------------
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]