Sergio Peña created FLINK-35707:
-----------------------------------
Summary: Allow column definition in CREATE TABLE AS (CTAS)
Key: FLINK-35707
URL: https://issues.apache.org/jira/browse/FLINK-35707
Project: Flink
Issue Type: Sub-task
Reporter: Sergio Peña
Allow defining new columns or overriding source column types on CTAS statements.
For following syntax should be allowed:
{noformat}
CREATE TABLE table_name [( <column_definition>[, ...n] )]
[WITH (table_properties)]
AS SELECT query_expression;
{noformat}
If new columns are defined in the create clause, then the columns should appear
at the beginning of the resulted sink schema. Columns of the query source
schema should appear at the end.
If source columns are re-defined in the create clause, then the columns should
appear in the same order as the query schema. Column types may be overridden,
but implicit casting rules should be validated and applied (similar to
iNSERT/SELECT statements) to make sure the SELECT query will be able to run and
write the data to the sink table.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)