rdblue commented on code in PR #4614:
URL: https://github.com/apache/iceberg/pull/4614#discussion_r857183965


##########
spark/v2.4/spark/src/main/java/org/apache/iceberg/spark/source/Writer.java:
##########
@@ -112,8 +122,10 @@ public DataWriterFactory<InternalRow> 
createWriterFactory() {
 
   @Override
   public void commit(WriterCommitMessage[] messages) {
-    if (replacePartitions) {
+    if (replacePartitions && overwriteFilter == null) {
       replacePartitions(messages);
+    } else if (replacePartitions) {

Review Comment:
   Shouldn't this be `if (overwriteFilter != null)`? What happens if this isn't 
using overwrite mode but you give it an overwrite filter? Should it fail?



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