[
https://issues.apache.org/jira/browse/ASTERIXDB-3155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706952#comment-17706952
]
ASF subversion and git services commented on ASTERIXDB-3155:
------------------------------------------------------------
Commit df16f3b867ae2e3887475c38735146ac2eb1e43a in asterixdb's branch
refs/heads/master from Ritik Raj
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=df16f3b867 ]
[ASTERIXDB-3155][SQL] Supporting escape backticks and singleQuote in SQL++
- user model changes: yes
- storage format changes: no
- interface changes: no
Details:
This patch contains change to allow escaping of backticks
so that field containing backticks don't throw
parsing error when they are used in the query.
Allows to
1. escape backticks using backticks(`) and reverse solidus (\)
2. escape singleQuotes(') using (')
Change-Id: I5d9069c6aaa1365545f7e0ca728be6ea2ca4641d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17450
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Peeyush Gupta <[email protected]>
Reviewed-by: Murtadha Hubail <[email protected]>
> Cannot escape backticks in SQL++
> --------------------------------
>
> Key: ASTERIXDB-3155
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3155
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: SQL - Translator SQL++
> Affects Versions: 0.9.8
> Reporter: Murtadha Makki Al Hubail
> Assignee: Ritik Raj
> Priority: Major
> Fix For: 0.9.9
>
>
> To reproduce:
> {noformat}
> create type t as {id:int};
> create dataset ds(t) primary key id;
> upsert into ds {"id":1, "first `name":"xyz"};
> {noformat}
> Now try to select the field "first `name". All of the following return errors:
> {noformat}
> SELECT * FROM ds WHERE `first `name`="XYZ";
> SELECT * FROM ds WHERE `first \`name`="XYZ";
> SELECT * FROM ds WHERE `first ``name`="XYZ";
> {noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)