Hi All, I am facing some issues while using Like operator & newline (\n) character. Below is the in details description :
*-------------------------------------------------- Hive Queries ------------------------------------------------------------* create table default.withdraw( id string ) stored as parquet; insert into default.withdraw select 'withdraw\ncash'; *--1) result = success* hive> select * from default.withdraw where id like '%withdraw%'; OK withdraw cash Time taken: 0.078 seconds, Fetched: 1 row(s) *--2) **result = wrong* hive> select * from default.withdraw where id like '%withdraw%cash'; OK Time taken: 0.066 seconds *--3) **result = success* hive> select * from default.withdraw where id like '%cash%'; OK withdraw cash Time taken: 0.086 seconds, Fetched: 1 row(s) *-------------------------------------------------- Drill Queries -----------------------------------------------------* FYI - Drill (v1.10.0) is using above table meta store. We tested above queries on drill too. *Summary* - I m getting unexpected results in this version (1.10.0). *Can someone please confirm what is the output on latest Drill version ?* Here are the Drill queries and its outputs: *--1) result = success* 0: jdbc:drill:> select * from withdraw; +----------------+ | id | +----------------+ | withdraw cash | +----------------+ 1 row selected (0.34 seconds) *--2) **result = wrong* 0: jdbc:drill:> select * from withdraw where id like '%withdraw%'; +-----+ | id | +-----+ +-----+ No rows selected (1.219 seconds) *--3) **result = wrong* 0: jdbc:drill:> select * from withdraw where id like '%withdraw%cash'; +-----+ | id | +-----+ +-----+ No rows selected (0.188 seconds) *--4) **result = wrong* 0: jdbc:drill:> select * from withdraw where id like '%cash%'; +-----+ | id | +-----+ +-----+ No rows selected (0.181 seconds) *-------------------------------------------------- * *-------------------------------------------------- * Please help here in case i am missing anything. regards, shankar