clintropolis commented on a change in pull request #9317: ANY Aggregator should 
not skip null values implementation
URL: https://github.com/apache/druid/pull/9317#discussion_r378152939
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/query/aggregation/any/NumericAnyBufferAggregator.java
 ##########
 @@ -32,11 +32,11 @@
 public abstract class NumericAnyBufferAggregator<TSelector extends 
BaseNullableColumnValueSelector>
     implements BufferAggregator
 {
-  private static final byte BYTE_FLAG_IS_NOT_SET = 0;
-  private static final byte BYTE_FLAG_IS_SET = 1;
-  private static final int IS_FOUND_FLAG_OFFSET_POSITION = 0;
-  private static final int IS_NULL_FLAG_OFFSET_POSITION = 
IS_FOUND_FLAG_OFFSET_POSITION + Byte.BYTES;
-  private static final int FOUND_VALUE_OFFSET_POSITION = 
IS_NULL_FLAG_OFFSET_POSITION + Byte.BYTES;
+  // Rightmost bit for is null check (0 for is null and 1 for not null)
+  // Second rightmost bit for is found check (0 for not found and 1 for found)
+  private static final byte BYTE_FLAG_FOUND_MASK = 0b0010;
 
 Review comment:
   super super nit, but can you use hex? (`0x02` and `0x01` for 
`BYTE_FLAG_NULL_MASK`)

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to