snuyanzin commented on code in PR #27445:
URL: https://github.com/apache/flink/pull/27445#discussion_r2708610219


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/converters/SqlNodeConvertUtils.java:
##########
@@ -85,7 +85,7 @@ static CatalogView toCatalogView(
                 context.getSqlValidator().getNamespace(validateQuery);
         validateDuplicatedColumnNames(query, viewFields, validatedNamespace);
 
-        String expandedQuery = context.toQuotedSqlString(query);
+        String expandedQuery = context.toQuotedSqlString(validateQuery);

Review Comment:
   I would like first understand the root cause (it might be Flink code as well 
since we very aggressively customize Calcite), however need to understand from 
where duplicated `ORDER BY` is coming from,
   otherwise same issue might pop up in multiple other places.
   
   Regarding Calcite: before raising an issue there we need to be able to 
reproduce in pure Calcite code without any Flink code involved



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