Ruben Q L created CALCITE-7905:
----------------------------------
Summary: AnsiSqlDialect does not check hint names and options for
block-comment delimiters
Key: CALCITE-7905
URL: https://issues.apache.org/jira/browse/CALCITE-7905
Project: Calcite
Issue Type: Bug
Components: core
Reporter: Ruben Q L
Assignee: Ruben Q L
Fix For: 1.43.0
AnsiSqlDialect.unparseTableScanHints writes table hints inside /*+ ... */.
This is done without verifying for block-comment delimiters, which would ends
the comment prematurely (quoting the value doesn't help, because the database
doesn't treat quotes as special inside a comment). In this case, the rest of
the hint text then becomes part of the statement, and the generated SQL no
longer matches the original semantics of the plan.
This only affects AnsiSqlDialect, which is also the fallback for unknown
products. The base SqlDialect drops hints. Hint names and keys have the same
gap.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)