[ 
https://issues.apache.org/jira/browse/SPARK-39887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17580137#comment-17580137
 ] 

Apache Spark commented on SPARK-39887:
--------------------------------------

User 'peter-toth' has created a pull request for this issue:
https://github.com/apache/spark/pull/37534

> Expression transform error
> --------------------------
>
>                 Key: SPARK-39887
>                 URL: https://issues.apache.org/jira/browse/SPARK-39887
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.1, 3.3.0, 3.2.2
>            Reporter: zhuml
>            Assignee: Peter Toth
>            Priority: Major
>             Fix For: 3.1.4, 3.4.0, 3.3.1, 3.2.3
>
>
> {code:java}
> spark.sql(
>   """
>     |select to_date(a) a, to_date(b) b from
>     |(select  a, a as b from
>     |(select to_date(a) a from
>     | values ('2020-02-01') as t1(a)
>     | group by to_date(a)) t3
>     |union all
>     |select a, b from
>     |(select to_date(a) a, to_date(b) b from
>     |values ('2020-01-01','2020-01-02') as t1(a, b)
>     | group by to_date(a), to_date(b)) t4) t5
>     |group by to_date(a), to_date(b)
>     |""".stripMargin).show(){code}
> result is (2020-02-01, 2020-02-01), (2020-01-01, 2020-01-01)
> expected (2020-02-01, 2020-02-01), (2020-01-01, 2020-01-02)



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