kgyrtkirk commented on a change in pull request #1439: URL: https://github.com/apache/hive/pull/1439#discussion_r484439075
########## File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveAggregateJoinTransposeRule.java ########## @@ -290,7 +291,8 @@ public void onMatch(RelOptRuleCall call) { RelNode r = relBuilder.build(); RelOptCost afterCost = mq.getCumulativeCost(r); RelOptCost beforeCost = mq.getCumulativeCost(aggregate); - if (afterCost.isLt(beforeCost)) { + boolean shouldForceTransform = isGroupingUnique(join, aggregate.getGroupSet()); Review comment: I've added a config: `hive.transpose.aggr.join.unique` to enable/disable this feature ---------------------------------------------------------------- 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. 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