You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "XiDuo You (Jira)" <ji...@apache.org> on 2022/06/07 07:44:00 UTC

[jira] [Updated] (SPARK-39397) Relax AliasAwareOutputExpression to support alias with expression

     [ https://issues.apache.org/jira/browse/SPARK-39397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

XiDuo You updated SPARK-39397:
------------------------------
    Description: 
We will pull out complex join keys from grouping expressions, so the project can hold a alias with expression. Unfortunately we may lose the output partitioning since the current AliasAwareOutputExpression only support preserve the alias with attribute.

As the result, the follow query will introduce three exchanges instead of two.
{code:java}
SELECT c1 + 1, count(*)
FROM t1
JOIN t2 ON c1 + 1 = c2
GROUP BY c1 + 1{code}

  was:
We will pull out complex join keys from grouping expressions, so the project can hold a alias with expression. Unfortunately we may lose the output partitioning since the current AliasAwareOutputExpression only support preserve the alias with attribute.

As the result, the follow query will introduce three exchanges.
{code:java}
SELECT c1 + 1, count(*)
FROM t1
JOIN t2 ON c1 + 1 = c2
GROUP BY c1 + 1{code}


> Relax AliasAwareOutputExpression to support alias with expression
> -----------------------------------------------------------------
>
>                 Key: SPARK-39397
>                 URL: https://issues.apache.org/jira/browse/SPARK-39397
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: XiDuo You
>            Priority: Major
>
> We will pull out complex join keys from grouping expressions, so the project can hold a alias with expression. Unfortunately we may lose the output partitioning since the current AliasAwareOutputExpression only support preserve the alias with attribute.
> As the result, the follow query will introduce three exchanges instead of two.
> {code:java}
> SELECT c1 + 1, count(*)
> FROM t1
> JOIN t2 ON c1 + 1 = c2
> GROUP BY c1 + 1{code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org