Niels Pardon created CALCITE-6644:
-------------------------------------
Summary: Escape single quoted string literals in
SnowflakeSqlDialect
Key: CALCITE-6644
URL: https://issues.apache.org/jira/browse/CALCITE-6644
Project: Calcite
Issue Type: Improvement
Components: core
Affects Versions: 1.38.0
Reporter: Niels Pardon
Snowflake, unlike other databases, requires additional escaping of backslashes
in single quoted string literals if they are not one of the common escape
sequences (e.g. \n, \t, \u1234, etc) as listed in documentation:
[https://docs.snowflake.com/en/sql-reference/data-types-text#escape-sequences-in-single-quoted-string-constants]
That means that for example for regular expression patterns which typically are
using pre-defined character classes like \d one has to escape the backslash in
a single quoted string literal as '\\d'.
It would make sense that the SnowflakeSqlDialect would be able to provide the
additional escaping when generating Snowflake specific SQL from relational
algebra.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)