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

Mihailo Aleksic resolved SPARK-52102.
-------------------------------------
    Resolution: Fixed

Not needed. Found another way to implement said.

> Normalize correlated aggregate function names in HAVING condition
> -----------------------------------------------------------------
>
>                 Key: SPARK-52102
>                 URL: https://issues.apache.org/jira/browse/SPARK-52102
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.1.0
>            Reporter: Mihailo Aleksic
>            Priority: Major
>              Labels: pull-request-available
>
> In the following query we would have `min(outer(t2.t2a))` as a name for 
> `min(t2a)` expression.
> {code:java}
> SELECT t1a 
> FROM   t1
> WHERE  t1a IN (SELECT t2a 
>                FROM   t2
>                WHERE  EXISTS (SELECT min(t2a) 
>                               FROM   t3))
> {code}
> This is a problem in compatibility between single-pass resolver and 
> fixed-point analyzer because names in single-pass are generated after we 
> finish resolution of aggregate expression `min(t2a)` (bottom-up manner) and 
> at that point we have `OuterReference` wrapped around aggregate expression 
> (name looks like `outer(min(t2a))`).
> I propose that we fix it by normalizing `Alias` names for correlated 
> aggregate functions in HAVING condition.



--
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

Reply via email to