szehon-ho commented on code in PR #6889:
URL: https://github.com/apache/iceberg/pull/6889#discussion_r1116232822


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java:
##########
@@ -605,7 +606,8 @@ public static void importSparkPartitions(
           filesToImport
               .map((MapFunction<DataFile, String>) f -> f.path().toString(), 
Encoders.STRING())
               .toDF("file_path");
-      Dataset<Row> existingFiles = loadMetadataTable(spark, targetTable, 
MetadataTableType.ENTRIES);
+      Dataset<Row> entriesFiles = loadMetadataTable(spark, targetTable, 
MetadataTableType.ENTRIES);

Review Comment:
   Style Nit: I think 'entriesFiles' doesnt make any sense.  
   
   And also to reduce code, can we use something like 
   ```
   loadMetadataTable(spark, targetTable, 
MetadataTableType.ENTRIES).filter("status != 2").
   ```
   
   Seems there is the API, but not 100% sure it works as expected in Java.  
That would be the best option to me.  Else we could maybe just call the df 
entries.



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