You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Ian Cook (JIRA)" <ji...@apache.org> on 2018/07/09 21:23:00 UTC
[jira] [Comment Edited] (IMPALA-7269) Single quote within
double-quoted string not matching
[ https://issues.apache.org/jira/browse/IMPALA-7269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16537609#comment-16537609 ]
Ian Cook edited comment on IMPALA-7269 at 7/9/18 9:22 PM:
----------------------------------------------------------
This issue also affects expressions in the {{WHERE}} clause that compare string columns with double-quoted literal strings. For example, when querying a table with a {{STRING}} column named {{publisher}} with the value {{O'Reilly}} in one or more row, the query
{{SELECT * FROM _table_ WHERE publisher = "O'Reilly";}}
returns zero rows, but the query
{{SELECT * FROM _table_ WHERE publisher = "O\'Reilly";}}
(with a backslash added before the apostrophe) will return the rows as expected.
was (Author: icook):
This issue also affects expressions in the {{WHERE}} clause that compare string columns with double-quoted literal strings. For example, when querying a table with a {{STRING}} column named {{publisher}} with the value {{O'Reilly}} in one or more row, the query
{{SELECT * FROM _table_ WHERE publisher = "O'Reilly";}}
returns zero rows, but the query
{{ SELECT * FROM _table_ WHERE publisher = "O\'Reilly";}}
(with a backslash added before the apostrophe) will return the rows as expected.
> Single quote within double-quoted string not matching
> -----------------------------------------------------
>
> Key: IMPALA-7269
> URL: https://issues.apache.org/jira/browse/IMPALA-7269
> Project: IMPALA
> Issue Type: Bug
> Affects Versions: Impala 2.10.0
> Reporter: Eric Karnowski
> Priority: Major
>
> I'm using Impala to query data with a string value:
> {{O'Reilly}}
> When I query this using double quotes to handle the single quote, it accepts the query but returns no rows. I have to escape the single quote with a backslash for it to match.
> Similarly,
> {{SELECT "O'Reilly"}}
> returns simply O
>
> I believe this is the same issue as https://issues.apache.org/jira/browse/IMPALA-1081 and https://issues.apache.org/jira/browse/IMPALA-3153 but these were closed as "cannot reproduce".
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org