You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "xuzhiwen1255 (via GitHub)" <gi...@apache.org> on 2023/03/19 08:30:24 UTC

[GitHub] [flink] xuzhiwen1255 commented on a diff in pull request #22208: [FLINK-31499] [table-planner] Move SqlCreateTable conversion logic to SqlCreateTableConverter

xuzhiwen1255 commented on code in PR #22208:
URL: https://github.com/apache/flink/pull/22208#discussion_r1141285647


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/converters/SqlNodeConverters.java:
##########
@@ -37,9 +40,9 @@ public class SqlNodeConverters {
     static {
         // register all the converters here
         register(new SqlCreateCatalogConverter());
-        register(new SqlCreateTableAsConverter());
-        register(new SqlCreateTableLikeConverter());
-        register(new SqlCreateTableConverter());
+        register(new SqlCreateTableConverter(), TypeInformation.of(SqlCreateTable.class));
+        register(new SqlCreateTableConverter(), TypeInformation.of(SqlCreateTableAs.class));
+        register(new SqlCreateTableConverter(), TypeInformation.of(SqlCreateTableLike.class));

Review Comment:
   Yes, there will be the following situation:
   If I only register one SqlCreateTable converter, other subclasses will not be able to obtain the instance of the SqlCreateTable converter, because when registering, I get the SqlCreateTable class as the Key through type analysis, and for subclasses: such as SqlCreateTableAs, it is Use the SqlCreateTableAs type as a key to find the converter, so it is not available.



-- 
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-unsubscribe@flink.apache.org

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