Details
Description
From impala shell, I am getting wrong results by using escape single quote for query, details explained below:
1. create a kudu table like:
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')
2. insert data to the table:
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 | +---+----------+---+
3. we should get the same row by using below two select query, but failed:
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)
Attachments
Issue Links
- duplicates
-
IMPALA-7586 Incorrect results when querying primary = "\"" in Kudu and HBase
- Resolved