You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/28 09:00:33 UTC
[GitHub] [iceberg] zinking commented on a diff in pull request #4629: Spark: Add positional and equality delete file count to ExpireSnapshot results
zinking commented on code in PR #4629:
URL: https://github.com/apache/iceberg/pull/4629#discussion_r860653667
##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java:
##########
@@ -176,16 +186,35 @@ protected Dataset<Row> loadMetadataTable(Table table, MetadataTableType type) {
return SparkTableUtil.loadMetadataTable(spark, table, type);
}
- private static class ReadManifest implements FlatMapFunction<ManifestFileBean, String> {
- private final Broadcast<FileIO> io;
+ private static class ReadManifest implements FlatMapFunction<ManifestFileBean, Tuple2<String, String>> {
+ private final Broadcast<Table> table;
- ReadManifest(Broadcast<FileIO> io) {
- this.io = io;
+ ReadManifest(Broadcast<Table> table) {
+ this.table = table;
}
@Override
- public Iterator<String> call(ManifestFileBean manifest) {
- return new ClosingIterator<>(ManifestFiles.readPaths(manifest, io.getValue()).iterator());
+ public Iterator<Tuple2<String, String>> call(ManifestFileBean manifest) {
+ return new ClosingIterator(entries(manifest));
+ }
+
+ public CloseableIterator<Tuple2<String, String>> entries(ManifestFileBean manifest) {
+ switch (manifest.content()) {
+ case DATA:
Review Comment:
isn't this always DATA in current imiplementation?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org