rubenada commented on PR #5266:
URL: https://github.com/apache/calcite/pull/5266#issuecomment-5679499557
Direct documentation references for backslash-escaping behaviors across all
8 impacted SQL dialects:
1. BigQuery
Source: [Google Cloud BigQuery Lexical Structure
Documentation](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/lexical)
"Quoted strings enclosed by single (') quotes can contain unescaped
double (") quotes, as well as the inverse. Backslashes (\) introduce escape
sequences."
2. ClickHouse
Source: [ClickHouse Syntax Reference
Documentation](https://clickhouse.com/docs/reference/syntax)
"In string literals, you need to escape at least ' and \ using
escape codes \' (or: '') and \\."
3. Firebolt
Source: [Firebolt Data Types
Documentation](https://docs.firebolt.io/reference-sql/data-types)
"String literals will also recognize backslash escape sequences."
4. Apache Hive
Source: [Apache Hive LanguageManual Types
(Literals)](https://hive.apache.org/docs/latest/language/literals/)
"String literals can be expressed with either single quotes (') or
double quotes ("). Hive uses C-style escaping within the strings."
5. Spark SQL
Source: [Apache Spark SQL Reference – Literals
Documentation](https://spark.apache.org/docs/latest/sql-ref-literals.html)
"Use \ to escape special characters (e.g., ' or \)."
6. Snowflake
Source: [Snowflake SQL Reference - Pattern Matching & String
Functions](https://docs.snowflake.com/en/sql-reference/functions-regexp)
"If you are using a regular expression in a single-quoted string
constant, you must escape any backslashes in backslash-sequences with a second
backslash."
7. Netezza
Source: [IBM Netezza / Netcool Documentation – Escape
Codes](https://www.ibm.com/docs/en/netcoolomnibus/8.0.0?topic=acquisition-escape-codes)
"Note: The escape sequences for backslash, single quote, and double
quote should be double-escaped. For example, to send a backslash character (\)
use \\\\."
8. Infobright
Infobright is built directly on the MySQL engine framework (Infobright
Enterprise Edition / IEE) and inherits MySQL's string lexing rules, which
process backslash escape sequences in string literals by default.
Source: [MySQL 8.0 Reference Manual – String
Literals](https://dev.mysql.com/doc/refman/8.0/en/string-literals.html)
(Applies to Infobright's engine parser)
"MySQL recognizes the escape sequences in string literals... \\ An
ASCII 92 backslash character."
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]