Wang Shuo created SPARK-33887:
---------------------------------

             Summary: Allow insert overwrite same table with static partition 
if using dynamic partition overwrite mode
                 Key: SPARK-33887
                 URL: https://issues.apache.org/jira/browse/SPARK-33887
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.0.1
            Reporter: Wang Shuo


{code:sql}
CREATE TABLE insertTable(i int, part int) USING PARQUET
PARTITIONED BY (part);

INSERT INTO TABLE insertTable PARTITION(part=1) SELECT 1;

SET spark.sql.sources.partitionOverwriteMode=DYNAMIC;

INSERT OVERWRITE TABLE insertTable PARTITION(part=1)
SELECT i + 1 FROM insertTable WHERE part = 1;
{code}

The SQL will fail because Spark complains  "Cannot overwrite a path that is 
also being read from."




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

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

Reply via email to