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)



*-------------------------------------------------- Presto Queries
-----------------------------------------------------*
FYI - Presto (v0.221) is using above table meta store. We tested above
queries on presto too.

*--1)  **result = **success*

presto> select * from default.withdraw where id like '%withdraw%';
   id
----------
withdraw
cash
(1 row)


*--2) **result = **success*

presto> select * from default.withdraw where id like '%withdraw%cash';
   id
----------
withdraw
cash
(1 row)


*--3) **result = **success*

presto> select * from default.withdraw where id like '%cash%';
   id
----------
withdraw
cash
(1 row)

*-------------------------------------------------- *
*-------------------------------------------------- *

Please help here in case i am missing anything.

regards,
shankar

Reply via email to