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

Dataset.selectExpr scope Session.active

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.2, 3.5.0
    • SQL
    • None

    Description

      //代码占位符
      val clone = spark.cloneSession()
      clone.conf.set("spark.sql.legacy.interval.enabled", "true")
      clone.sql("select '2023-01-01'+ INTERVAL 1 YEAR as b").show()
      clone.sql("select '2023-01-01' as a").selectExpr("a + INTERVAL 1 YEAR as b").show() 

      The first one can be executed successfully, but the second one cannot be executed successfully.

      Because selectExpr and sql use different sparkSession conf.

      Attachments

        Activity

          People

            zhuml Mingliang Zhu
            zhuml Mingliang Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: