Jackie-Jiang commented on code in PR #18873:
URL: https://github.com/apache/pinot/pull/18873#discussion_r3763118256


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/DistinctCountBitmapAggregationFunction.java:
##########
@@ -71,8 +72,22 @@ public void aggregate(int length, AggregationResultHolder 
aggregationResultHolde
       Map<ExpressionContext, BlockValSet> blockValSetMap) {
     BlockValSet blockValSet = blockValSetMap.get(_expression);
 
+    DataType dataType = blockValSet.getValueType();
+    DataType storedType = dataType.getStoredType();
+
+    // UUID values are logical scalars (stored as 16-byte BYTES) — not 
serialized RoaringBitmap state. Add the
+    // hashCode of the canonical UUID string so DISTINCTCOUNTBITMAP(uuidCol) 
matches
+    // DISTINCTCOUNTBITMAP(CAST(uuidCol AS STRING)).
+    if (dataType == DataType.UUID) {

Review Comment:
   > One question on scope while I am in there: do you want the pre-existing MV 
BYTES gap fixed in the same pass, or kept separate so this PR stays UUID-only? 
Fixing it changes behaviour for existing BYTES columns, which felt like it 
deserved its own change, but it is the same few lines.
   
   Both ways work



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to