JingsongLi commented on code in PR #4381:
URL: https://github.com/apache/paimon/pull/4381#discussion_r1821874381


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/AbstractFlinkTableFactory.java:
##########
@@ -243,16 +257,34 @@ static Table buildPaimonTable(DynamicTableFactory.Context 
context) {
         newOptions.putAll(origin.getOptions());
         newOptions.putAll(dynamicOptions);
 
-        // notice that the Paimon table schema must be the same with the 
Flink's
-        if (origin instanceof DataCatalogTable) {
-            FileStoreTable fileStoreTable = (FileStoreTable) 
((DataCatalogTable) origin).table();
-            table = fileStoreTable.copyWithoutTimeTravel(newOptions);
+        FileStoreTable fileStoreTable;
+
+        // The following if conditions provide a shortcut to acquire Paimon 
table.
+        if (origin instanceof FormatCatalogTable) {

Review Comment:
   It should not be a `FormatCatalogTable`.



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