alexandre-normand commented on code in PR #721:
URL: https://github.com/apache/iceberg-go/pull/721#discussion_r2850367986


##########
table/transaction.go:
##########
@@ -1212,6 +1282,117 @@ func (t *Transaction) rewriteSingleFile(ctx 
context.Context, fs io.IO, originalF
        return result, nil
 }
 
+// writePositionDeletesForFiles rewrites data files by preserving only rows 
that do NOT match the filter
+func (t *Transaction) writePositionDeletesForFiles(ctx context.Context, fs 
io.IO, updater *snapshotProducer, files []iceberg.DataFile, filter 
iceberg.BooleanExpression, caseSensitive bool, concurrency int) error {
+       posDeleteRecIter, err := t.makePositionDeleteRecordsForFilter(ctx, fs, 
files, filter, caseSensitive, concurrency)
+       if err != nil {
+               return err
+       }
+
+       partitionDataPerFile := make(map[string]map[int]any, len(files))
+       for _, df := range files {
+               partitionPath, _ := path.Split(df.FilePath())
+               partitionDataPerFile[partitionPath] = df.Partition()

Review Comment:
   I took the suggested fix but also used the partition spec to get the 
partition path for the new delete files. Done in 
ce0c40d983ad70456b50f0a7aa34a94c98f9f076. 



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