kasakrisz commented on code in PR #6988:
URL: https://github.com/apache/hive/pull/6988#discussion_r4754097709


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveAggregateJoinTransposeRule.java:
##########
@@ -197,17 +201,41 @@ public void onMatch(RelOptRuleCall call) {
         if (unique) {
           ++uniqueCount;
           relBuilder.push(joinInput);
-          
relBuilder.project(belowAggregateKey.asList().stream().map(relBuilder::field).collect(Collectors.toList()));
+          final List<RexNode> projects = new ArrayList<>();
+          for (Integer i : belowAggregateKey) {

Review Comment:
   I backported this code from Calcite
   
https://github.com/apache/calcite/blob/d6c81d757a8fcec3ea4ac4e0b51e437ee6ae1683/core/src/main/java/org/apache/calcite/rel/rules/AggregateJoinTransposeRule.java#L248-L251
   
   IMHO any change should be done in Calcite first. 
   



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

Reply via email to