Max Gekk created SPARK-45162:
--------------------------------
Summary: Unsupported map/array constructors via `call_function` in
parameterized `sql()`
Key: SPARK-45162
URL: https://issues.apache.org/jira/browse/SPARK-45162
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 4.0.0
Reporter: Max Gekk
Assignee: Max Gekk
The example below demonstrates the issue:
{code:scala}
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
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]