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


##########
pinot-common/src/main/java/org/apache/pinot/common/function/FunctionUtils.java:
##########
@@ -91,6 +91,7 @@ private FunctionUtils() {
       put(Timestamp[].class, ColumnDataType.TIMESTAMP_ARRAY);
       put(String[].class, ColumnDataType.STRING_ARRAY);
       put(byte[][].class, ColumnDataType.BYTES_ARRAY);
+      put(UUID[].class, ColumnDataType.UUID_ARRAY);

Review Comment:
   MAJOR: This maps a UUID[] scalar-function result to UUID_ARRAY, but the 
single-stage ScalarTransformFunctionWrapper has no transformToBytesValuesMV 
implementation for that result; BaseTransformFunction throws when the result is 
read. FunctionUtils.getRelDataType also lacks UUID_ARRAY, so planner and 
executor types disagree. Please complete both paths before registering UUID[] 
as a supported return type.



##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/LiteralContext.java:
##########
@@ -169,8 +168,8 @@ private static PinotDataType getPinotDataType(DataType 
type, @Nullable Object va
     boolean singleValue = !value.getClass().isArray();
     switch (type) {
       case BOOLEAN:
-        Preconditions.checkState(singleValue, "Boolean array is not 
supported");
-        return PinotDataType.BOOLEAN;
+        return singleValue ? PinotDataType.BOOLEAN

Review Comment:
   MAJOR: Logical array literals still fail in single-stage queries. 
LiteralContext now accepts BOOLEAN, BIG_DECIMAL, TIMESTAMP, and UUID arrays, 
but TransformFunctionFactory routes array literals to 
ArrayLiteralTransformFunction, whose constructors support none of these types. 
For example, ARRAY[TRUE, FALSE] reaches its unsupported-type branch. Please 
extend that execution path and cover it with a query-level regression test.



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