xiangfu0 commented on code in PR #19247:
URL: https://github.com/apache/pinot/pull/19247#discussion_r3848949177
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/utils/TypeUtils.java:
##########
@@ -132,6 +132,18 @@ public static Object convert(Object value, ColumnDataType
storedType) {
// For ArrayAggregationFunction
return ArrayListUtils.toBytesArray((ObjectArrayList<ByteArray>)
value);
}
+ if (value instanceof Object[] && ((Object[]) value).length == 0) {
Review Comment:
Updated in 0ac648fb9b. I removed the empty `Object[]` special case and its
synthetic test assertions. The required `byte[][]` to `ByteArray[]`
normalization remains for dynamically evaluated BYTES_ARRAY values. Focused
`TypeUtilsTest` and `TransformOperatorTest` coverage passes.
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/parser/CalciteRexExpressionParser.java:
##########
@@ -146,6 +146,8 @@ public static Literal toLiteral(RexExpression.Literal
literal) {
value = BooleanUtils.isTrueInternalValue(value);
} else if (dataType == ColumnDataType.BYTES || dataType ==
ColumnDataType.UUID) {
value = ((ByteArray) value).getBytes();
+ } else if (dataType == ColumnDataType.BYTES_ARRAY) {
+ value = dataType.toExternal(value);
Review Comment:
Updated in 0ac648fb9b. The BYTES_ARRAY branch now directly unwraps
`ByteArray[]` into `byte[][]` with an indexed loop, avoiding
`ColumnDataType.toExternal()` and its switch. The parser/runtime focused tests
and both-engine E2E pass.
--
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]