spena commented on code in PR #25758: URL: https://github.com/apache/flink/pull/25758#discussion_r1876497296
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlDdlToOperationConverterTest.java: ########## @@ -804,6 +804,61 @@ public void testCreateTableAsWithColumnsOverridden() { .build())))); } + @Test + public void testCreateTableAsWithOverriddenMetadataColumns() { + CatalogTable catalogTable = + CatalogTable.newBuilder() + .schema( + Schema.newBuilder() + .column("f0", DataTypes.INT().notNull()) + .column("f1", DataTypes.BIGINT()) + .build()) + .build(); + + catalogManager.createTable( + catalogTable, ObjectIdentifier.of("builtin", "default", "src1"), false); + + final String sql = "create table tbl1 (f1 bigint metadata) " + "AS SELECT * FROM src1"; Review Comment: The second case is not valid. You cannot have aliases in the CREATE part, only in the SELECT part. I updated a test to include aliases on physical and metadata columns. The same for RTAS tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org