[
https://issues.apache.org/jira/browse/FLINK-31494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17701683#comment-17701683
]
Jark Wu commented on FLINK-31494:
---------------------------------
[~xzw0223], the key idea is not putting all the conversion logic in a single
class, otherwise it's huge and hard to maintain.
> 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
> Labels: pull-request-available
>
> 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)