[ https://issues.apache.org/jira/browse/SPARK-36727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tongwei updated SPARK-36727: ---------------------------- External issue URL: https://github.com/apache/spark/pull/33986 > 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: Minor > > {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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org