Indhumathi27 commented on code in PR #6202:
URL: https://github.com/apache/hive/pull/6202#discussion_r2665854600


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/LimitPushdownOptimizer.java:
##########
@@ -198,6 +198,11 @@ public Object process(Node nd, Stack<Node> stack,
           }
           currentOp = currentOp.getChildOperators().get(0);
         }
+        // Skip RS copy for plans that are already TopNKey-optimized to avoid 
re-propagating
+        // TopNKey configuration into the same ReduceSink.
+        if (((LimitPushdownContext)procCtx).disallowRSCopy && 
foundGroupByOperator) {

Review Comment:
   This check is added to avoid propagating RS in case of RS-GB-RS, where RS1 
is already TopNkey optimized. 



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