Gengliang Wang created SPARK-57028:
--------------------------------------

             Summary: HashJoin: drop conditionPassed in codegenOuter when there 
is no join condition
                 Key: SPARK-57028
                 URL: https://issues.apache.org/jira/browse/SPARK-57028
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 5.0.0
            Reporter: Gengliang Wang


{{HashJoin.codegenOuter}} emits a {{boolean conditionPassed}} variable plus 
either an {{if (!conditionPassed) { reset }}} block (unique-key path) or an 
{{if (conditionPassed) { ... }}} wrap around the inner loop body 
(non-unique-key path) regardless of whether {{condition}} is defined.

When {{condition.isEmpty}}:
- the variable is initialized to {{true}} and never reassigned;
- the {{if (!conditionPassed)}} reset block is dead;
- the {{if (conditionPassed)}} wrap is unconditional.

Detect {{condition.isEmpty}} and omit the variable, the reset block, and the 
wrap. {{OuterJoinSuite}} covers both branches with whole-stage codegen on/off.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to