deniskuzZ commented on code in PR #5483:
URL: https://github.com/apache/hive/pull/5483#discussion_r1806119255
##########
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:
why do we need distinct here? getPartitionKeys already does 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.
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]