Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-37935 Migrate onto error classes
  3. SPARK-41181

Migrate the map options errors onto error classes

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • SQL
    • None

    Description

      The example below demonstrates the issue:

      > select from_csv('1', 'a INT', named_struct('mode', 'PERMISSIVE'))
      
      org.apache.spark.sql.AnalysisException
      {
        "errorClass" : "LEGACY",
        "messageParameters" : {
          "message" : "Must use a map() function for options.; line 1 pos 7"
        }
      }
      

      and

      > select to_csv(named_struct('a', 1, 'b', 2), map('mode', 1));
      
      org.apache.spark.sql.AnalysisException
      {
        "errorClass" : "LEGACY",
        "messageParameters" : {
          "message" : "A type of keys and values in map() must be string, but got map<string,int>.; line 1 pos 7"
        }
      }
      

      Attachments

        Activity

          People

            panbingkun BingKun Pan
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: