zratkai commented on code in PR #5483:
URL: https://github.com/apache/hive/pull/5483#discussion_r1806706403
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -484,6 +484,10 @@ public static List<FieldSchema> getPartitionKeys(Table
table, int specId) {
String.format("Transform: %s",
partField.transform().toString()))).collect(Collectors.toList());
}
+ public static List<FieldSchema> getAllPartitionKeys(Table table) {
+ return table.specs().keySet().stream().flatMap(id ->
getPartitionKeys(table, id).stream())
Review Comment:
Done.
##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java:
##########
@@ -139,6 +140,21 @@ public static boolean onlyContainsPartnCols(Table tab,
ExprNodeDesc expr) {
return true;
}
+ private static boolean isPartitioned(Table table) {
+ if (table.getStorageHandler() != null &&
table.getStorageHandler().alwaysUnpartitioned()) {
+ return table.getStorageHandler().isPartitioned(table);
+ } else {
+ return table.isPartitioned();
+ }
+ }
+
+ private static boolean isPartitionKey(Table table, String columnName) {
+ List<String> partitionKeyNames = table.getStorageHandler() != null &&
table.getStorageHandler().alwaysUnpartitioned() ?
+ table.getStorageHandler().getPartitionKeys(table, false).stream()
+ .map(fieldSchema ->
fieldSchema.getName()).distinct().collect(Collectors.toList()) :
table.getPartCols().stream().map(FieldSchema::getName).collect(
Review Comment:
Removed.
--
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]