You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Zine eddine Zidane (Jira)" <ji...@apache.org> on 2023/04/15 14:12:00 UTC

[jira] [Created] (CALCITE-5652) How to add a database-specific comment symbol

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)