[ 
https://issues.apache.org/jira/browse/CALCITE-7905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134345#comment-18134345
 ] 

Mihai Budiu commented on CALCITE-7905:
--------------------------------------

how could end-of-comment delimters end up in the comment? The parser would end 
the comment in the same place.

> 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
>            Priority: Major
>              Labels: pull-request-available
>             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)

Reply via email to