[
https://issues.apache.org/jira/browse/FLINK-31494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17701631#comment-17701631
]
xuzhiwen edited comment on FLINK-31494 at 3/17/23 10:14 AM:
------------------------------------------------------------
Hi [~jark] , Will SqlNodeConverters register all SQLnodes? My initial idea is
the same, but I feel that although this reduces the amount of
SqlToOperationConverter code, it will swell in SqlNodeConverters.
was (Author: xzw0223):
hi [~jark] , Will SqlNodeConverters register all SQLnodes? My initial idea is
the same, but I feel that although this reduces the amount of
SqlToOperationConverter code, it will swell in SqlNodeConverters
> Introduce SqlNodeConverter for SqlToOperationConverter
> ------------------------------------------------------
>
> Key: FLINK-31494
> URL: https://issues.apache.org/jira/browse/FLINK-31494
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Reporter: xuzhiwen
> Assignee: Jark Wu
> Priority: Major
>
> Introduce {{SqlNodeConverter}} for {{SqlToOperationConverter}}, following
> Timo's idea in FLINK-31368
> class like:
> {code:java}
> public interface SqlNodeConverter<S extends SqlNode> {
> Operation convertSqlNode(S node, ConvertContext context);
> }
> /** Registry of SqlNode converters. */
> public class SqlNodeConverters {
> private static final Map<Class<?>, SqlNodeConverter<?>> CONVERTERS = new
> HashMap<>();
> static {
> // register all the converters here
> register(new SqlCreateCatalogConverter());
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)