lincoln-lil commented on code in PR #25185:
URL: https://github.com/apache/flink/pull/25185#discussion_r1715348075


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/converters/SqlReplaceTableAsConverter.java:
##########
@@ -49,10 +49,10 @@ public Operation convertSqlNode(SqlReplaceTableAs 
sqlReplaceTableAs, ConvertCont
         ObjectIdentifier identifier = 
catalogManager.qualifyIdentifier(unresolvedIdentifier);
 
         SqlNode asQuerySqlNode = sqlReplaceTableAs.getAsQuery();
-        context.getSqlValidator().validate(asQuerySqlNode);
+        SqlNode validated = context.getSqlValidator().validate(asQuerySqlNode);
         QueryOperation query =
                 new PlannerQueryOperation(
-                        context.toRelRoot(asQuerySqlNode).project(),
+                        context.toRelRoot(validated).project(),

Review Comment:
   Good catch!



##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/sql/RTASITCase.java:
##########
@@ -108,6 +108,27 @@ void testCreateOrReplaceTableAS() throws Exception {
         verifyCatalogTable(expectCatalogTable, getCatalogTable("target"));
     }
 
+    @Test
+    void testCreateOrReplaceTableASWithLimit() throws Exception {
+        env().setParallelism(1);

Review Comment:
   ditto



##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/batch/sql/RTASITCase.java:
##########
@@ -78,6 +78,29 @@ void testReplaceTableAS() throws Exception {
         verifyCatalogTable(expectCatalogTable, getCatalogTable("target"));
     }
 
+    @Test
+    void testReplaceTableASWithLimit() throws Exception {
+        env().setParallelism(1);

Review Comment:
   Why must be single parallelism?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to