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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -484,10 +507,16 @@ public static Map<PartitionData, Integer> 
getPartitionInfo(Table icebergTable, M
                 ResidualEvaluator resEval = 
ResidualEvaluator.of(icebergTable.specs().get(entry.getValue()),
                     expression, false);
                 return 
resEval.residualFor(entry.getKey()).isEquivalentTo(Expressions.alwaysTrue()) &&
-                    (entry.getKey().size() == partSpecMap.size() || 
allowPartialSpec);
+                    (entry.getKey().size() == partSpecMap.size() || 
allowPartialSpec) &&
+                    (entry.getValue() == icebergTable.spec().specId() || 
!latestSpecOnly);
               }).forEach(entry -> result.put(entry.getKey(), 
entry.getValue())));
     }
 
     return result;
   }
+
+  public static boolean isPartitioned(Table table) {
+    return IcebergTableUtil.getPartitionFields(table).size() > 0;

Review Comment:
   do we need this method? can we use `table.spec().isPartitioned()`?



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