stevenzwu commented on code in PR #6614:
URL: https://github.com/apache/iceberg/pull/6614#discussion_r1120950156


##########
flink/v1.16/flink/src/main/java/org/apache/iceberg/flink/TableLoader.java:
##########
@@ -116,6 +130,24 @@ public void close() throws IOException {
       }
     }
 
+    /**
+     * Implemented as a deep clone to prevent references to the same 
catalogLoader
+     *
+     * @return Cloned catalogLoader.
+     */
+    @Override
+    @SuppressWarnings("checkstyle:NoClone")
+    public TableLoader clone() {
+      try {
+        CatalogTableLoader clonedTableLoader = (CatalogTableLoader) 
super.clone();
+        clonedTableLoader.catalogLoader = this.catalogLoader.clone();

Review Comment:
   again, we should use constructor directly



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to