xiangfu0 commented on code in PR #18873:
URL: https://github.com/apache/pinot/pull/18873#discussion_r3743408718
##########
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/GroupByDataTableReducer.java:
##########
@@ -531,6 +531,13 @@ private Object getConvertedKey(DataTable dataTable,
ColumnDataType columnDataTyp
return dataTable.getString(rowId, colId);
case BYTES:
return dataTable.getBytes(rowId, colId).getBytes();
+ case UUID:
+ // Deliberately delegated to ColumnDataType#convert rather than
falling through to BYTES. The other reduce
+ // path (reduceWithIndexedTable) converts group keys with exactly that
method, and UUID is the one type
+ // whose converted form is not its stored bytes -- it yields a
java.util.UUID. PredicateRowMatcher casts
+ // directly on that, so returning the raw byte[] here makes GROUP BY
... HAVING on a UUID column throw
+ // ClassCastException. Delegating keeps the two paths identical by
construction.
+ return columnDataType.convert(dataTable.getBytes(rowId, colId));
Review Comment:
shall we add a dataTable.getUuid(...) method?
--
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]