davidradl commented on code in PR #25758:
URL: https://github.com/apache/flink/pull/25758#discussion_r1876140487


##########
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:
   I am wondering if we could test: 
   table src2 g1 and g2
   
   `create table tbl1 (f1 bigint metadata)  AS SELECT s.g1 as f1 FROM src2 as 
s;`
   
   and is this sort of thing valid - or as the 2 ASes not allowed?
   `create table tbl1 (g1 bigint metadata as f1)  AS SELECT s.g1 FROM src2 as 
s;`
   
   



-- 
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

Reply via email to