slinkydeveloper commented on a change in pull request #18701:
URL: https://github.com/apache/flink/pull/18701#discussion_r803663446



##########
File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/CompiledPlan.java
##########
@@ -79,25 +79,37 @@ default void writeToFile(Path path) throws IOException {
     }
 
     /** @see #writeToFile(File, boolean) */
-    default void writeToFile(Path path, boolean ignoreIfExists)
-            throws IOException, UnsupportedOperationException {
+    default void writeToFile(Path path, boolean ignoreIfExists) throws 
IOException {
         writeToFile(path.toFile(), ignoreIfExists);
     }
 
     /**
-     * Writes this plan to a file using the JSON representation. This will not 
overwrite the file if
-     * it's already existing.
+     * Writes this plan to a file using the JSON representation. This 
operation will be noop if the
+     * file already exists, even if the content is different from this plan.
+     *
+     * @throws IOException if the file cannot be written.
      */
     default void writeToFile(File file) throws IOException {
         writeToFile(file, true);

Review comment:
       Is that's the case, then perhaps the method below should have a 3 valued 
flag: OVERWRITE, IGNORE, FAIL where the default is 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]


Reply via email to