dramaticlly commented on code in PR #17522:
URL: https://github.com/apache/iceberg/pull/17522#discussion_r3716667886
##########
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:
I think we shall follow the #17443 if possible.
- if caseSensitive and filter is only used once, no need to declare as
variable?
`new SnapshotEvaluator(filter(), MANIFEST_FILE_SCHEMA.asStruct(),
isCaseSensitive());`
- would rename the variable `filter` to `residual` for using in
ManifestListReadTask
--
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]