[
https://issues.apache.org/jira/browse/SPARK-46144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gengliang Wang reassigned SPARK-46144:
--------------------------------------
Assignee: Gengliang Wang
> Fail INSERT INTO ... REPLACE statement if the condition contains subquery
> -------------------------------------------------------------------------
>
> Key: SPARK-46144
> URL: https://issues.apache.org/jira/browse/SPARK-46144
> Project: Spark
> Issue Type: Task
> Components: SQL
> Affects Versions: 4.0.0
> Reporter: Gengliang Wang
> Assignee: Gengliang Wang
> Priority: Major
> Labels: pull-request-available
>
> For the following query:
> {code:java}
> INSERT INTO tbl REPLACE WHERE id = (select c2 from values(1) as t(c2)) SELECT
> * FROM source{code}
> There will be an analysis error:
> {code:java}
> [UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column, variable, or function
> parameter with name `c2` cannot be resolved. SQLSTATE: 42703; line 1 pos 51;
> 'OverwriteByExpression RelationV2[id#27L, data#28] testcat.tbl testcat.tbl,
> (id#27L = scalar-subquery#26 []), false {code}
> The error message is confusing. The actually reason is the
> OverwriteByExpression plan doesn't support subqueries. While supporting the
> feature is non-trivial, we should improve the error message.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]