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

Improve the analysis exception of missing map key column

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • SQL
    • None

    Description

      Sometimes users forgot to add single quotes on the map key string literal, for example `map_col[a]`. In such a case, the Analyzer will throw an exception:

      [MISSING_COLUMN] Column 'struct.a' does not exist. Did you mean one of the following? ...

      We can improve this message by saying that the user should append single quotes if the map key is a string literal.

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: