You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/10/11 03:21:00 UTC

[jira] [Assigned] (SPARK-36727) Support sql overwrite a path that is also being read from when partitionOverwriteMode is dynamic

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

Apache Spark reassigned SPARK-36727:
------------------------------------

    Assignee:     (was: Apache Spark)

> Support sql overwrite a path that is also being read from when partitionOverwriteMode is dynamic
> ------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-36727
>                 URL: https://issues.apache.org/jira/browse/SPARK-36727
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.1.2
>            Reporter: Tongwei
>            Priority: Major
>
> {code:java}
> // non-partitioned table overwrite
> CREATE TABLE tbl (col1 INT, col2 STRING) USING PARQUET;
> INSERT OVERWRITE TABLE tbl SELECT 0,1;
> INSERT OVERWRITE TABLE tbl SELECT * FROM tbl;
> // partitioned table static overwrite
> CREATE TABLE tbl (col1 INT, col2 STRING) USING PARQUET PARTITIONED BY (pt1 INT);
> INSERT OVERWRITE TABLE tbl PARTITION(p1=2021) SELECT 0 AS col1,1 AS col2;
> INSERT OVERWRITE TABLE tbl PARTITION(p1=2021) SELECT col1, col2 FROM WHERE p1=2021;
> {code}
> When we run the above query, an error will be throwed "Cannot overwrite a path that is also being read from"
> We need to support this operation when the spark.sql.sources.partitionOverwriteMode is dynamic



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org