AnkitaAdvitot commented on code in PR #19586:
URL: https://github.com/apache/pinot/pull/19586#discussion_r4118585147
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/ArrayFunctions.java:
##########
@@ -359,6 +361,20 @@ public static Object arrayValueConstructor(Object... arr) {
}
return bytesArr;
}
+ if (clazz == Timestamp.class) {
Review Comment:
Updated the branches in `arrayValueConstructor` to follow the standard Pinot
type order: `BIG_DECIMAL`, `BOOLEAN`, `TIMESTAMP`, `STRING`, `BYTES`, and
`UUID` last. Also updated `ArrayFunctionsTest` accordingly.
##########
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:
Updated `LiteralContext.getPinotDataType` so that the switch follows `INT,
LONG, FLOAT, DOUBLE, BIG_DECIMAL, BOOLEAN, TIMESTAMP, STRING, UUID`, keeping
the separate `BYTES` validation above the switch. Also aligned
`LiteralContext.toString()` with this order.
--
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]