yangshangqing95 commented on code in PR #17522:
URL: https://github.com/apache/iceberg/pull/17522#discussion_r3721661759


##########
core/src/main/java/org/apache/iceberg/AllManifestsTable.java:
##########
@@ -123,13 +123,17 @@ protected CloseableIterable<FileScanTask> doPlanFiles() {
       FileIO io = table().io();
       Map<Integer, PartitionSpec> specs = Maps.newHashMap(table().specs());
       Schema dataTableSchema = table().schema();
-      Expression filter = shouldIgnoreResiduals() ? Expressions.alwaysTrue() : 
filter();
+      Expression rowFilter = filter();
+      boolean caseSensitive = isCaseSensitive();
+      boolean ignoreResiduals = shouldIgnoreResiduals();
 
       SnapshotEvaluator snapshotEvaluator =
-          new SnapshotEvaluator(filter, MANIFEST_FILE_SCHEMA.asStruct(), 
isCaseSensitive());
+          new SnapshotEvaluator(rowFilter, MANIFEST_FILE_SCHEMA.asStruct(), 
caseSensitive);
       Iterable<Snapshot> filteredSnapshots =
           Iterables.filter(table().snapshots(), snapshotEvaluator::eval);
 
+      Expression filter = ignoreResiduals ? Expressions.alwaysTrue() : 
rowFilter;

Review Comment:
   Thanks @dramaticlly @uros-b for the reviewing!
   make sense, fixed, and also removed the variable `ignoreResiduals`
   `filter` is used twice, think declare as variable would make the code more 
readable.



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