[
https://issues.apache.org/jira/browse/FLINK-22315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17509569#comment-17509569
]
dalongliu edited comment on FLINK-22315 at 3/21/22, 3:13 AM:
-------------------------------------------------------------
The column position is only used in ADD column syntax, we should not change the
existing behavior of create table syntax, so there is no need to introduce
column position in sql parse for create table, it is not good. For ADD column,
we just need the new added columns and its position, then combine the added
columns and original table columns, just do a simple sorting before performing
the actual alter table action. Moreover, for add regular/pyhiscal/computed
column, we can just reuse the parse method in parserImpls.ftl instead of
changing it. We also should merge code of add single column and multiple
columns case in implementation.
was (Author: lsy):
The column position is only used in ADD column syntax, we should not change the
existing behavior of create table syntax, so there is no need to introduce
column position in sql parse for create table, it is not good. For ADD column,
we just need the new added columns and its position, then combine the added
columns and original table columns, just do a simple sorting before performing
the actual alter table action. Moreover, for add regular/pyhiscal/computed
column, we can just reuse the parse method in parserImpls.ftl instead of
changing it. We also should merge code of add single column and multiple
columns case in code.
> Support ADD column/constraint/watermark for ALTER TABLE statement
> -----------------------------------------------------------------
>
> Key: FLINK-22315
> URL: https://issues.apache.org/jira/browse/FLINK-22315
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Jark Wu
> Assignee: RocMarshal
> Priority: Major
> Labels: pull-request-available, stale-assigned
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)