soupam05 commented on code in PR #16038: URL: https://github.com/apache/pinot/pull/16038#discussion_r2144385380
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/HashJoinOperator.java: ########## @@ -132,13 +171,28 @@ protected List<Object[]> buildJoinedRows(MseBlock.Data leftBlock) { } } + private boolean handleNullKey(Object key, Object[] leftRow, List<Object[]> rows) { + if (isNullKey(key)) { + // For INNER joins, don't add anything when key is null + if (_joinType == JoinRelType.LEFT || _joinType == JoinRelType.FULL) { + handleUnmatchedLeftRow(leftRow, rows); + } Review Comment: If the condition is right.col1 IS NULL, this logic ensures that unmatched left rows (i.e., those with no join match) are still added to the output with null-filled right sides. In such cases, right.col1 will be null in the resulting row, so the IS NULL condition will pass during filtering. Matched rows with non-null right values will not pass the filter. This behavior aligns with SQL semantics for LEFT JOIN ... WHERE right.col1 IS NULL. -- 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