[ 
https://issues.apache.org/jira/browse/SPARK-46144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gengliang Wang resolved SPARK-46144.
------------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Issue resolved by pull request 44060
[https://github.com/apache/spark/pull/44060]

> 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
>             Fix For: 4.0.0
>
>
> 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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to