Copilot commented on code in PR #19247:
URL: https://github.com/apache/pinot/pull/19247#discussion_r3781138687


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/utils/TypeUtils.java:
##########
@@ -132,6 +132,14 @@ public static Object convert(Object value, ColumnDataType 
storedType) {
           // For ArrayAggregationFunction
           return ArrayListUtils.toBytesArray((ObjectArrayList<ByteArray>) 
value);
         }
+        if (value instanceof byte[][]) {
+          byte[][] bytesArray = (byte[][]) value;
+          ByteArray[] internalBytesArray = new ByteArray[bytesArray.length];
+          for (int i = 0; i < bytesArray.length; i++) {
+            internalBytesArray[i] = new ByteArray(bytesArray[i]);
+          }
+          return internalBytesArray;

Review Comment:
   The new `byte[][]` normalization branch is not exercised by the added 
runtime test: constant `ARRAY_VALUE_CONSTRUCTOR` expressions are intercepted by 
`BytesArrayLiteralOperand` and already return `ByteArray[]`, so this code never 
runs. Please add a focused test for `TypeUtils.convert(byte[][], BYTES_ARRAY)` 
(or a non-literal function path) that verifies the returned `ByteArray[]` 
contents, since this conversion is required before block serialization.



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