You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "swuferhong (via GitHub)" <gi...@apache.org> on 2023/06/28 03:17:05 UTC

[GitHub] [flink] swuferhong commented on a diff in pull request #22881: [FLINK-32447][table-planner] Fix missing table hints when they inside a view referenced by an external query

swuferhong commented on code in PR #22881:
URL: https://github.com/apache/flink/pull/22881#discussion_r1244615225


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/SqlNodeConvertContext.java:
##########
@@ -60,7 +60,9 @@ public RelRoot toRelRoot(SqlNode sqlNode) {
     public String toQuotedSqlString(SqlNode sqlNode) {
         SqlParser.Config parserConfig = flinkPlanner.config().getParserConfig();
         SqlDialect dialect =
-                new CalciteSqlDialect(
+                // The default implementation of SqlDialect suppresses all table hints since
+                // CALCITE-4640, so we should use AnsiSqlDialect instead to reserve table hints.
+                new AnsiSqlDialect(

Review Comment:
   The difference between `CalciteSqlDialect` and `AntiSqlDialect` is the method `withIdentifierQuoteString()`. Would replacing `\"`  to ```  have any other impact in Flink? 



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org