Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Allow defining new columns or overriding source column types on CTAS statements.
For following syntax should be allowed:
CREATE TABLE table_name [( <column_definition>[, ...n] )] [WITH (table_properties)] AS SELECT query_expression;
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.
Attachments
Attachments
Issue Links
- Dependent
-
FLINK-35709 Allow reordering source column names in CTAS / RTAS
- Resolved
- links to