abmo-x commented on code in PR #6839:
URL: https://github.com/apache/iceberg/pull/6839#discussion_r1108972286
##########
core/src/main/java/org/apache/iceberg/avro/Avro.java:
##########
@@ -153,6 +155,18 @@ public WriteBuilder metricsConfig(MetricsConfig
newMetricsConfig) {
return this;
}
+ /**
+ * Overwrite only if needed on File systems where a new empty file gets
pre-created like {@link
+ * HadoopFileIO}
+ *
+ * @return {@link WriteBuilder}
+ */
+ public WriteBuilder overwriteIfNeeded() {
+ boolean needsOverwrite =
+ file instanceof HadoopFileIO || file instanceof
Files.LocalOutputFile;
Review Comment:
@amogh-jahagirdar
you are write, fixed it to use HadoopOutputFile.
Added unit tests as well.
--
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]