Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-33354 New explicit cast syntax rules in ANSI mode
  3. SPARK-34856

ANSI mode: Allow casting complex types as string type

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Currently, complex types are not allowed to cast as string type. This breaks the Dataset.show() API. E.g

      scala> sql(“select array(1, 2, 2)“).show(false)
      org.apache.spark.sql.AnalysisException: cannot resolve ‘CAST(`array(1, 2, 2)` AS STRING)’ due to data type mismatch:
       cannot cast array<int> to string with ANSI mode on.
      

        Attachments

          Activity

            People

            • Assignee:
              Gengliang.Wang Gengliang Wang
              Reporter:
              Gengliang.Wang Gengliang Wang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment