Max Gekk created SPARK-50322:
--------------------------------
Summary: Cannot resolve parameterized identifier in a sub-query
Key: SPARK-50322
URL: https://issues.apache.org/jira/browse/SPARK-50322
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 4.0.0
Reporter: Max Gekk
Assignee: Max Gekk
The example below portraits the issue:
```
create table tt1(c1 int);
insert into tt1 values (1);
execute immediate 'with v1 as (select * from tt1 where 1 = (Select * from
identifier(:tab))) select * from v1' using 'tt1' as tab;
[UNBOUND_SQL_PARAMETER] Found the unbound parameter: tab. Please, fix `args`
and provide a mapping of the parameter to either a SQL literal or collection
constructor functions such as `map()`, `array()`, `struct()`. SQLSTATE: 42P02;
line 1 pos 66;
'Project [*]
+- 'SubqueryAlias v1
+- 'SubqueryAlias v1
+- 'Project [*]
+- 'Filter (1 = scalar-subquery#10 [])
: +- 'Project [*]
: +- 'PlanWithUnresolvedIdentifier namedparameter(tab),
org.apache.spark.sql.catalyst.parser.AstBuilder$$Lambda$3404/0x000000f802380000@45ec7633
+- SubqueryAlias spark_catalog.default.tt1
+- Relation spark_catalog.default.tt1[c1#4] parquet
```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]