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

Unsupported map/array constructors via `call_function` in parameterized `sql()`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      The example below demonstrates the issue:

      scala> sql("SELECT element_at(:mapParam, 'a')", Map("mapParam" -> call_function("map", lit("a"), lit(1))))
      org.apache.spark.sql.catalyst.ExtendedAnalysisException: [UNBOUND_SQL_PARAMETER] Found the unbound parameter: mapParam. Please, fix `args` and provide a mapping of the parameter to a SQL literal.; line 1 pos 18;
      'NameParameterizedQuery [mapParam='map(a, 1)]
      +- 'Project [unresolvedalias('element_at(namedparameter(mapParam), a), None)]
         +- OneRowRelation
      

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: