[
https://issues.apache.org/jira/browse/SPARK-45162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Max Gekk resolved SPARK-45162.
------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
Issue resolved by pull request 42894
[https://github.com/apache/spark/pull/42894]
> 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
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
>
> 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]