deniskuzZ commented on code in PR #5498:
URL: https://github.com/apache/hive/pull/5498#discussion_r1809363242


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -445,9 +444,9 @@ public static List<DeleteFile> getDeleteFiles(Table table, 
String partitionPath)
         t -> ((PositionDeletesScanTask) t).file()));
   }
 
-  public static Expression generateExpressionFromPartitionSpec(Table table, 
Map<String, String> partitionSpec)
-      throws SemanticException {
-    Map<String, PartitionField> partitionFieldMap = 
getPartitionFields(table).stream()
+  public static Expression generateExpressionFromPartitionSpec(Table table, 
Map<String, String> partitionSpec,
+      boolean latestSpecOnly) throws SemanticException {
+    Map<String, PartitionField> partitionFieldMap = getPartitionFields(table, 
latestSpecOnly).stream()

Review Comment:
   or are you saying that we could refactor it to
   ````
     public static List<PartitionField> getPartitionFields(Table table, boolean 
latestSpecOnly) {
       return latestSpecOnly ? table.spec().fields() :
         table.specs().values().stream()
           .flatMap(spec -> spec.fields().stream()).distinct()
           .collect(Collectors.toList());
     }
   ````



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to