[ 
https://issues.apache.org/jira/browse/FLINK-31533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17711265#comment-17711265
 ] 

Aitozi commented on FLINK-31533:
--------------------------------

After some trying, I find it's seems easy to support this feature. It doesn't 
have to touch the syntax part. Because the CTAS reuse/(part of) the 
SqlCreateTable syntax. So the sql below can be parsed already
{code:java}
 CREATE TABLE MyCtasTable 
 PARTITIONED BY (`a`) 
 WITH (
  'connector' = 'filesystem',
  'format' = 'testcsv',
)  AS
 SELECT * FROM MyTable{code}
We can't define this  because it's manually banned in 
{{SqlCreateTableAs#validate}}

In my poc, it just need some minor change to support the partition by 
definition and do not have to touch the public api/syntax. Do you think we 
still needs a FLIP for this or not [~luoyuxia] ?

> CREATE TABLE AS SELECT should support to define partition
> ---------------------------------------------------------
>
>                 Key: FLINK-31533
>                 URL: https://issues.apache.org/jira/browse/FLINK-31533
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: luoyuxia
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to