[
https://issues.apache.org/jira/browse/CALCITE-7599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18088087#comment-18088087
]
Chris Dennis commented on CALCITE-7599:
---------------------------------------
For now I'm converting them to string literals on the parsing side. It seem
this would be defensible since it's what is currently done for list options
which do allow numeric literals. It should (I believe) change nothing for
consumers of hints, but just allows a little more flexibility for those writing
them. I actually spotted this because I saw the original issue, and had hoped I
would be able to drop the quoting in my own uses since I have sql hints that
take numeric values.
> Enhance parser to allow numeric literals as values in k/v hints as suggested
> by documentation
> ---------------------------------------------------------------------------------------------
>
> Key: CALCITE-7599
> URL: https://issues.apache.org/jira/browse/CALCITE-7599
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.42.0
> Reporter: Chris Dennis
> Priority: Minor
> Labels: pull-request-available
>
> There is a small inconsistency remaining between the reference documentation
> [https://calcite.apache.org/docs/reference.html#syntax] and the parser
> syntax. The documentation example shows unquoted numeric literals being used
> as values in a k/v hint. This isn't reflected in the grammar that follows in
> the document, the parser grammar itself, or in
> {{SqlHintsConverterTest#testDocumentationExample}}. I think it should be
> pretty simple to expand the grammar to support either a string or numeric
> literal, and to update the test to exactly match the documentation example by
> not quoting the two numeric constants.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)