You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2119fea
Browse filesBrowse the repository at this point in the historyBrowse files
fix: lex // as a line comment only for H2 and Snowflake (#2957)
LINE_COMMENT matched // in every dialect, but only H2 and Snowflake have
// comments. Everywhere else //* is a division followed by a block
comment, so SELECT 6 //*x*/ 2, (SELECT max(pw) FROM secrets) parsed as
SELECT 6 while MySQL, MariaDB, PostgreSQL, SQL Server and SQLite run the
subquery.
// comments are now a lexer switch like # comments
(Feature.allowDoubleSlashLineComments, withDoubleSlashLineComments),
turned on by the H2 and SNOWFLAKE presets.
- ``".."`` reads as a string literal instead of a quoted identifier (BigQuery, Spark/Databricks, MySQL default ``sql_mode``); combined with ``withBackslashEscapeCharacter``, ``\\"`` does not end the literal, as in MySQL ``"it\\"s"``
2098
2100
* - ``withHashLineComments``
2099
2101
- ``#`` starts a line comment
2102
+
* - ``withDoubleSlashLineComments``
2103
+
- ``//`` starts a line comment (H2, Snowflake); otherwise ``//*`` is a division followed by a block comment
2100
2104
* - ``withBlankLinesAsSeparator``
2101
2105
- ``false`` stops two empty lines (``\n\n\n``) ending a statement, so they read as plain whitespace
0 commit comments