walterddr commented on code in PR #10790:
URL: https://github.com/apache/pinot/pull/10790#discussion_r1207272732


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/LeafStageTransferableBlockOperator.java:
##########
@@ -308,13 +309,16 @@ private static boolean inOrder(int[] columnIndices) {
    * @param dataSchema data schema desired for the row.
    * @return canonicalize row.
    */
-  private static Object[] canonicalizeRow(Object[] row, DataSchema dataSchema) 
{
+  private static Object[] canonicalizeRow(Object[] row, DataSchema dataSchema, 
DataSchema resultSchema) {
     Object[] resultRow = new Object[row.length];
     for (int colId = 0; colId < row.length; colId++) {
       Object value = row[colId];
       if (value != null) {
         if (dataSchema.getColumnDataType(colId) == 
DataSchema.ColumnDataType.OBJECT) {
           resultRow[colId] = value;
+        } else if (dataSchema.getColumnDataType(colId) == 
DataSchema.ColumnDataType.BYTES) {
+          dataSchema.getColumnDataTypes()[colId] = 
resultSchema.getColumnDataType(colId);

Review Comment:
   this seems wrong. we can't simply modify the "desiredDataSchema" which is 
given during logical planning. modifying it causes downstream issues which 
might've been hidden due to the auto-casting nature of v2 operator.



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to