TongWeii opened a new pull request #33986:
URL: https://github.com/apache/spark/pull/33986


   ### What changes were proposed in this pull request?
   ```
   // 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;
   ```
   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
   
   ### How was this patch tested?
   Unit tests -> InsertSuite.scala
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to