ngsg commented on code in PR #4360:
URL: https://github.com/apache/hive/pull/4360#discussion_r1212608492


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java:
##########
@@ -985,12 +982,45 @@ private static void 
sharedWorkExtendedOptimization(ParseContext pctx, SharedWork
   /**
    * Obtain the RS input for a mapjoin operator.
    */
-  private static ReduceSinkOperator obtainBroadcastInput(MapJoinOperator 
mapJoinOp) {
+  private static ReduceSinkOperator obtainFirstBroadcastInput(MapJoinOperator 
mapJoinOp) {
     return mapJoinOp.getParentOperators().get(0) instanceof ReduceSinkOperator 
?
         (ReduceSinkOperator) mapJoinOp.getParentOperators().get(0) :
         (ReduceSinkOperator) mapJoinOp.getParentOperators().get(1);
   }
 
+  private static boolean canShareBroadcastInputs(

Review Comment:
   1. Sure, I will add one.
   2. I used static method because it does not rely on any of the state of 
SharedWorkOptimizer instance. I agree that nonstatic method should be preferred 
to static method and will modify this method and some other static methods such 
as obtainFirstBroadcastInput() to be nonstatic.



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