JeonDaehong commented on code in PR #18027:
URL: https://github.com/apache/iceberg/pull/18027#discussion_r4021003700


##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnarBatchUtil.java:
##########
@@ -119,6 +144,14 @@ public static boolean[] buildIsDeleted(
     }
 
     PositionDeleteIndex deletedPositions = deletes.deletedRowPositions();
+
+    if (deletedPositions != null && !deletes.hasEqDeletes()) {

Review Comment:
   Not intentional.
   I folded the branches in `buildRowIdMapping`
   and left `buildIsDeleted` behind, so the two read differently for the same
   condition.
   
   They now have the same shape, and `buildIsDeleted` also skips the per-row
   loop when there is nothing deleted at all
   
   ```
       if (!deletes.hasEqDeletes()) {
         // positions in a batch form a contiguous ascending range, so the index
         // can be traversed once for the whole range instead of being probed
         // once per row
         if (deletedPositions != null) {
           IsDeletedCollector collector =
               new IsDeletedCollector(deletes, isDeleted, rowStartPosInBatch);
           deletedPositions.forEachInRange(
               rowStartPosInBatch, rowStartPosInBatch + batchSize, collector);
         }
   
         return isDeleted;
       }
   ```



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