gustavoatt opened a new pull request, #4614:
URL: https://github.com/apache/iceberg/pull/4614

   ## Summary
   
   Spark 2.4 supports overwriting partition by expression. Similarly to how in 
Spark 3.x we can do it via the dataframe API:
   
   ```java
   df
     .write
     .mode("iceberg")
     .overwrite($ds === "2021-01-01")
     .save($TABLE)
   ```
   
   It can now be done through the write option `overwrite-partitions`:
   
   ```java
   df
     .write
     .mode("iceberg")
     .option("overwrite-partitions", "ds='2021-01-01'")
     .save($TABLE).
   ```
   
   ## Background
   
   This work is motivated due to the lack of support of `INSERT OVERWRITE 
PARTITION($VAL) ...` on Spark 2. As of now there was no way of replacing a 
partition when multiple partition specs are present on a table.
   
   More details can be found on this [slack 
thread](https://apache-iceberg.slack.com/archives/C025PH0G1D4/p1649869204622389)
   


-- 
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