Details
Description
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()
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)
Attachments
Issue Links
- links to
(3 links to)