Zine eddine Zidane created CALCITE-5652:
-------------------------------------------

             Summary: How to add a database-specific comment symbol
                 Key: CALCITE-5652
                 URL: https://issues.apache.org/jira/browse/CALCITE-5652
             Project: Calcite
          Issue Type: New Feature
          Components: core
    Affects Versions: 1.34.0
            Reporter: Zine eddine Zidane


Is there a clean way to add a database-specific comment symbol? for example, 
the hash symbol "#" is used for inline comments on Mysql, Postgres, and Oracle.

A straightforward way is to just add it to the regular expression definition of 
the SINGLE_LINE_COMMENT keyword below but is this will make it a valid symbol 
regardless of a database which is not the intent
{code:java}
<DEFAULT, DQID, BTID, BQID, BQHID> SKIP :
{
    <SINGLE_LINE_COMMENT: ("//" | "--") (~["\n","\r"])* ("\r\n"|"\r"|"\n")?>
} {code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to