Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-39887

Expression transform error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.1, 3.3.0, 3.2.2
    • 3.1.4, 3.3.1, 3.2.3, 3.4.0
    • SQL
    • None

    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

        Activity

          People

            petertoth Peter Toth
            zhuml Mingliang Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: