szehon-ho commented on a change in pull request #4382:
URL: https://github.com/apache/iceberg/pull/4382#discussion_r834874889
##########
File path: core/src/main/java/org/apache/iceberg/AllDataFilesTable.java
##########
@@ -108,30 +80,20 @@ public TableScan asOfTime(long timestampMillis) {
}
@Override
- protected CloseableIterable<FileScanTask> planFiles(
- TableOperations ops, Snapshot snapshot, Expression rowFilter,
- boolean ignoreResiduals, boolean caseSensitive, boolean colStats) {
- CloseableIterable<ManifestFile> manifests = allDataManifestFiles(
- ops.current().snapshots(), context().planExecutor());
- String schemaString = SchemaParser.toJson(schema());
- String specString =
PartitionSpecParser.toJson(PartitionSpec.unpartitioned());
- Expression filter = ignoreResiduals ? Expressions.alwaysTrue() :
rowFilter;
- ResidualEvaluator residuals = ResidualEvaluator.unpartitioned(filter);
-
- return CloseableIterable.transform(manifests, manifest ->
- new ManifestReadTask(ops.io(), ops.current().specsById(), manifest,
schema(),
- schemaString, specString, residuals));
+ public CloseableIterable<FileScanTask> planFiles() {
+ return super.planAllFiles();
}
- }
- private static CloseableIterable<ManifestFile> allDataManifestFiles(
- List<Snapshot> snapshots, ExecutorService workerPool) {
- try (CloseableIterable<ManifestFile> iterable = new ParallelIterable<>(
- Iterables.transform(snapshots, snapshot -> (Iterable<ManifestFile>) ()
-> snapshot.dataManifests().iterator()),
- workerPool)) {
- return CloseableIterable.withNoopClose(Sets.newHashSet(iterable));
- } catch (IOException e) {
- throw new RuntimeIOException(e, "Failed to close parallel iterable");
+ @Override
+ protected CloseableIterable<ManifestFile> manifests() {
Review comment:
Yea as the AllDataFilesTable used to use a parallel iterable. It's more
flexible I think in case the other Files tables want to use that later.
##########
File path: core/src/main/java/org/apache/iceberg/BaseFilesTable.java
##########
@@ -110,21 +110,19 @@ public TableScan appendsAfter(long fromSnapshotId) {
/**
* @return list of manifest files to explore for this files metadata table
scan
Review comment:
Will fix
--
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]