badalprasadsingh commented on code in PR #2046:
URL: https://github.com/apache/iceberg-go/pull/2046#discussion_r4076878710


##########
table/transaction.go:
##########
@@ -2800,17 +2785,72 @@ func (t *Transaction) 
classifyFilesForFilteredDeletions(ctx context.Context, fs
        }
 
        if err := g.Wait(); err != nil {
-               return nil, nil, nil, err
+               return nil, nil, err
        }
 
-       return filesToDelete, filesWithPartialDeletes, fileSeqByPath, nil
+       return filesToDelete, filesWithPartialDeletes, nil
+}
+
+// rewriteScanTasks returns a scan task for each rewrite candidate that 
carries the deletes applying to it on the
+// planning snapshot, matched the same way scan planning matches them.
+//
+// Delete manifests are not pruned by the row filter: with filter id=2 the 
rewrite keeps id=1,
+// so a delete on id=1 must still be applied.
+func (t *Transaction) rewriteScanTasks(fs io.IO, entries 
[]iceberg.ManifestEntry) ([]FileScanTask, error) {
+       meta, err := t.txnMeta()
+       if err != nil {
+               return nil, err
+       }
+       builtMeta, err := meta.Build()
+       if err != nil {
+               return nil, err
+       }
+
+       var liveDeletes []iceberg.ManifestEntry
+       if s := t.planningSnapshot(meta); s != nil {
+               for entry, err := range s.entries(fs, 
iceberg.ManifestContentDeletes) {

Review Comment:
   I am keeping the PR minimal as of now, have documented the limitation in 
code, will raise a follow-up PR for that.



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