You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Zine eddine Zidane (Jira)" <ji...@apache.org> on 2023/05/04 07:21:00 UTC
[jira] [Created] (CALCITE-5684) Parser fails to differentiate between empty string '' and escaped string literal quote
Zine eddine Zidane created CALCITE-5684:
-------------------------------------------
Summary: Parser fails to differentiate between empty string '' and escaped string literal quote
Key: CALCITE-5684
URL: https://issues.apache.org/jira/browse/CALCITE-5684
Project: Calcite
Issue Type: New Feature
Components: core
Reporter: Zine eddine Zidane
In the example query below (redshift):
{code:java}
SELECT CASE WHEN table.columnA IS NOT NULL THEN '' ELSE table.columnA END columnA FROM table where (columnA LIKE '%example%') {code}
When the parser reaches "THEN ''" it considers the second single quote as an escape character so rather than returning the correct string literal which is an empty string '' it returns:
'' ELSE table.columnA END columnA FROM table where (columnA LIKE '
--
This message was sent by Atlassian Jira
(v8.20.10#820010)