You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "fangwan (JIRA)" <ji...@apache.org> on 2018/07/17 05:26:00 UTC

[jira] [Commented] (KUDU-2487) kudu quote escape issues in select query

    [ https://issues.apache.org/jira/browse/KUDU-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16546040#comment-16546040 ] 

fangwan commented on KUDU-2487:
-------------------------------

any updates?

> kudu quote escape issues in select query
> ----------------------------------------
>
>                 Key: KUDU-2487
>                 URL: https://issues.apache.org/jira/browse/KUDU-2487
>             Project: Kudu
>          Issue Type: Bug
>          Components: impala
>    Affects Versions: 1.7.0
>         Environment: kudu-1.7.0
> cdh5.15.0
> impala-2.12.0
>            Reporter: fangwan
>            Priority: Critical
>
> From impala shell, I am getting wrong results by using escape single quote for query, details explained below:
>  1. create a kudu table like:
> {code:java}
> CREATE TABLE test_cf_escape(
>  x INT NOT NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION,
> y STRING NOT NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION,
> z INT NULL ENCODING AUTO_ENCODING COMPRESSION DEFAULT_COMPRESSION,
> PRIMARY KEY(x, y)
> )
> STORED AS KUDU
> TBLPROPERTIES ('kudu.master_addresses'='hadoop-nn.xxx.com'){code}
> 2. insert data to the table:
> {code:java}
> insert into test_cf_escape (x,y,z) values (1, "chili\\\'s", 0);
> insert into test_cf_escape (x,y,z) values (1, "chili\'s", 2);
> select * from test_cf_escape;
> =>
> +---+----------+---+
> | x | y        | z |
> +---+----------+---+
> | 1 | chili's  | 2 |
> | 1 | chili\'s | 0 |
> +---+----------+---+
> {code}
> 3. we should get the same row by using below two select query, but failed:
> {code:java}
> select * from test_cf_escape where y = 'chili\'s'; => (1, 'chili\'s', 0) (supposed to read data as (1, "chili's", 2))
> select * from test_cf_escape where y = "chili's"; => (1, "chili's", 2)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)