aokolnychyi commented on code in PR #4566:
URL: https://github.com/apache/iceberg/pull/4566#discussion_r850880061


##########
core/src/main/java/org/apache/iceberg/AllManifestsTable.java:
##########
@@ -85,58 +85,41 @@ MetadataTableType metadataTableType() {
   public static class AllManifestsTableScan extends BaseAllMetadataTableScan {
 
     AllManifestsTableScan(TableOperations ops, Table table, Schema fileSchema) 
{
-      super(ops, table, fileSchema);
+      super(ops, table, fileSchema, MetadataTableType.ALL_MANIFESTS);
     }
 
     private AllManifestsTableScan(TableOperations ops, Table table, Schema 
schema,
                                   TableScanContext context) {
-      super(ops, table, schema, context);
+      super(ops, table, schema, MetadataTableType.ALL_MANIFESTS, context);
     }
 
     @Override
-    protected TableScan newRefinedScan(TableOperations ops, Table table, 
Schema schema,
-                                       TableScanContext context) {
-      return new AllManifestsTableScan(ops, table, schema, context);
+    protected TableScan newRefinedScan(Schema schema, TableScanContext 
context) {
+      return new AllManifestsTableScan(ops(), table(), schema, context);
     }
 
     @Override
-    public TableScan useSnapshot(long scanSnapshotId) {
-      throw new UnsupportedOperationException("Cannot select snapshot: 
all_manifests is for all snapshots");
-    }
-
-    @Override
-    public TableScan asOfTime(long timestampMillis) {
-      throw new UnsupportedOperationException("Cannot select snapshot: 
all_manifests is for all snapshots");
-    }
-
-    @Override
-    protected String tableType() {
-      return MetadataTableType.ALL_MANIFESTS.name();
-    }
-
-    @Override
-    protected CloseableIterable<FileScanTask> planFiles(
-        TableOperations ops, Snapshot snapshot, Expression rowFilter,
-        boolean ignoreResiduals, boolean caseSensitive, boolean colStats) {
+    protected CloseableIterable<FileScanTask> doPlanFiles() {
+      FileIO io = table().io();
       String schemaString = SchemaParser.toJson(schema());
       String specString = 
PartitionSpecParser.toJson(PartitionSpec.unpartitioned());
       Map<Integer, PartitionSpec> specs = Maps.newHashMap(table().specs());
+      Expression filter = shouldIgnoreResiduals() ? Expressions.alwaysTrue() : 
filter();
+      ResidualEvaluator residuals = ResidualEvaluator.unpartitioned(filter);
 
-      return 
CloseableIterable.withNoopClose(Iterables.transform(ops.current().snapshots(), 
snap -> {

Review Comment:
   I checked and `table()` returns the main table in all cases so 
`table().snapshots()` is equivalent to accessing table operations but shorter 
and uses a higher level API. 



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