aokolnychyi commented on a change in pull request #2297:
URL: https://github.com/apache/iceberg/pull/2297#discussion_r587845046
##########
File path: spark/src/main/java/org/apache/iceberg/actions/BaseSparkAction.java
##########
@@ -101,47 +117,43 @@
return allManifests.flatMap(new ReadManifest(ioBroadcast),
Encoders.STRING()).toDF("file_path");
}
- protected Dataset<Row> buildManifestFileDF(SparkSession spark, String
tableName) {
- return loadMetadataTable(spark, tableName, table().location(),
ALL_MANIFESTS).selectExpr("path as file_path");
+ protected Dataset<Row> buildManifestFileDF(Table table) {
+ return loadMetadataTable(table, ALL_MANIFESTS).selectExpr("path as
file_path");
}
- protected Dataset<Row> buildManifestListDF(SparkSession spark, Table table) {
+ protected Dataset<Row> buildManifestListDF(Table table) {
List<String> manifestLists = getManifestListPaths(table.snapshots());
return spark.createDataset(manifestLists,
Encoders.STRING()).toDF("file_path");
}
- protected Dataset<Row> buildManifestListDF(SparkSession spark, String
metadataFileLocation) {
- StaticTableOperations ops = new
StaticTableOperations(metadataFileLocation, table().io());
- return buildManifestListDF(spark, new BaseTable(ops, table().name()));
- }
-
- protected Dataset<Row> buildOtherMetadataFileDF(SparkSession spark,
TableOperations ops) {
+ protected Dataset<Row> buildOtherMetadataFileDF(TableOperations ops) {
List<String> otherMetadataFiles = getOtherMetadataFilePaths(ops);
return spark.createDataset(otherMetadataFiles,
Encoders.STRING()).toDF("file_path");
}
- protected Dataset<Row> buildValidMetadataFileDF(SparkSession spark, Table
table, TableOperations ops) {
Review comment:
I removed SparkSession from args in all these methods to simplify it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]