soupam05 commented on code in PR #16038:
URL: https://github.com/apache/pinot/pull/16038#discussion_r2143308293


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java:
##########
@@ -59,16 +60,21 @@ public class HashJoinOperator extends BaseJoinOperator {
   // TODO: Optimize this
   @Nullable
   private Map<Object, BitSet> _matchedRightRows;
+  // Store null key rows separately for RIGHT and FULL JOINs
+  @Nullable
+  private List<Object[]> _nullKeyRightRows;
 
   public HashJoinOperator(OpChainExecutionContext context, MultiStageOperator 
leftInput, DataSchema leftSchema,
-      MultiStageOperator rightInput, JoinNode node) {
+                          MultiStageOperator rightInput, JoinNode node) {
     super(context, leftInput, leftSchema, rightInput, node);
     List<Integer> leftKeys = node.getLeftKeys();
     Preconditions.checkState(!leftKeys.isEmpty(), "Hash join operator requires 
join keys");
     _leftKeySelector = KeySelectorFactory.getKeySelector(leftKeys);
     _rightKeySelector = KeySelectorFactory.getKeySelector(node.getRightKeys());
     _rightTable = createLookupTable(leftKeys, leftSchema);
     _matchedRightRows = needUnmatchedRightRows() ? new HashMap<>() : null;
+    // Initialize _nullKeyRightRows for both RIGHT and FULL JOINs
+    _nullKeyRightRows = (_joinType == JoinRelType.RIGHT || _joinType == 
JoinRelType.FULL) ? new ArrayList<>() : null;

Review Comment:
   I have updated the code.



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to