[ https://issues.apache.org/jira/browse/SPARK-42897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703686#comment-17703686 ]
Apache Spark commented on SPARK-42897: -------------------------------------- User 'wankunde' has created a pull request for this issue: https://github.com/apache/spark/pull/40523 > Avoid evaluate more than once for the variables from the left side in the > FullOuter SMJ condition > ------------------------------------------------------------------------------------------------- > > Key: SPARK-42897 > URL: https://issues.apache.org/jira/browse/SPARK-42897 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.4.0 > Reporter: Wan Kun > Priority: Minor > > Codegen issue for FullOuter SMJ, for example > {code} > val df1 = spark.range(5).select($"id".as("k1")) > val df2 = spark.range(10).select($"id".as("k2")) > df1.join(df2.hint("SHUFFLE_MERGE"), > $"k1" === $"k2" % 3 && $"k1" + 3 =!= $"k2" && $"k1" + 5 =!= $"k2", > "full_outer") > {code} > the join condition *$"k1" + 3 =!= $"k2" && $"k1" + 5 =!= $"k2"* both will > evaluate the variable *k1* and caused the codegen failed. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org