RajaVinoth96 commented on code in PR #19501:
URL: https://github.com/apache/pinot/pull/19501#discussion_r4237450744


##########
pinot-core/src/main/java/org/apache/pinot/core/common/datablock/DataBlockBuilder.java:
##########
@@ -149,6 +149,7 @@ public static RowDataBlock buildFromRows(List<Object[]> 
rows, DataSchema dataSch
               fixedSize.putInt(dictId);
               break;
             case BYTES:
+              value = value instanceof ByteArray ? value : new 
ByteArray((byte[]) value);

Review Comment:
   i have add test for this. From what i noticed the Calcite Sql validator 
casts the bytes field to varchar, resulting in rexNode to `<(CAST($1):VARCHAR 
CHARACTER SET "UTF-8" NOT NULL, _UTF-8'a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d')` , 
the predicate resolves both sides to String and does not throw a 
`ClassCastException`. Should i make any changes to the 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