You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wan Kun (Jira)" <ji...@apache.org> on 2023/03/22 14:13:00 UTC
[jira] [Created] (SPARK-42897) Avoid evaluate more than once for the variables from the left side in the FullOuter SMJ condition
Wan Kun created SPARK-42897:
-------------------------------
Summary: 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
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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org