ramesh0201 commented on code in PR #5462:
URL: https://github.com/apache/hive/pull/5462#discussion_r1801806837


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java:
##########
@@ -1006,6 +1006,16 @@ private boolean canShareBroadcastInputs(
       return false;
     }
 
+    // Map Joins when vectorized can have different formats for the hash 
tables built on the small table.
+    // Reusing hash tables between different join type can lead to 
ClassCastException or even wrong results.
+    if (mapJoinOp1.getConf().getConds() != null && 
mapJoinOp1.getConf().getConds().length > 0
+        && mapJoinOp2.getConf().getConds() != null && 
mapJoinOp2.getConf().getConds().length > 0
+        && mapJoinOp1.getConf().getConds()[0].getType() != 
mapJoinOp2.getConf().getConds()[0].getType()
+        && (mapJoinOp1.getConf().isNoOuterJoin() || 
mapJoinOp2.getConf().isNoOuterJoin())) {

Review Comment:
   Yes, if they are both outer joins, we still generate the same hash table 
type.



-- 
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: gitbox-unsubscr...@hive.apache.org

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

Reply via email to