tanmayrauth commented on code in PR #1151:
URL: https://github.com/apache/iceberg-go/pull/1151#discussion_r3397276546


##########
table/arrow_utils.go:
##########
@@ -1753,13 +1750,14 @@ func positionDeleteRecordsToDataFilesDV(ctx 
context.Context, rootLocation string
                        positions := batch.Column(1).(*array.Int64)
 
                        for i := range batch.NumRows() {
-                               // PR (1) of #1135 reshaped DVWriter.Add to 
take (specID,
-                               // partitionData) so the partitioned path can 
pass through
-                               // partitionContext directly. This site is still
-                               // unpartitioned-only (the gate above routes 
partitioned
-                               // writes elsewhere), so specID=0 + nil 
partition. PR (2)
-                               // drops the gate and threads partitionContext 
through here.
-                               writer.Add(filePaths.Value(int(i)), 
[]int64{positions.Value(int(i))}, 0, nil)
+                               filePath := filePaths.Value(int(i))
+                               pCtx, ok := partitionContextByFilePath[filePath]
+                               if !ok {
+                                       yield(nil, fmt.Errorf("unexpected 
missing partition context for path %s", filePath))

Review Comment:
   Good catch, I've switched TestDVWritePathCancelledContext to pass 
unpartitionedContexts() instead of nil so it matches the other v3 tests and 
won't silently flip failure modes if a valid row gets added  before the  
cancellation. Test still passes.



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