You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Shankar (JIRA)" <ji...@apache.org> on 2019/07/18 09:37:00 UTC
[jira] [Created] (HIVE-22008) Apache Hive 2.3.4 - Issue with
combination of Like operator & newline (\n) character in data
Shankar created HIVE-22008:
------------------------------
Summary: Apache Hive 2.3.4 - Issue with combination of Like operator & newline (\n) character in data
Key: HIVE-22008
URL: https://issues.apache.org/jira/browse/HIVE-22008
Project: Hive
Issue Type: Bug
Components: Hive
Affects Versions: 2.3.4
Reporter: Shankar
I am facing some issues while using *Like* operator & *newline* (\n) character. Below is the in details description :
{color:#263238}*-------------------------------------------------- Hive Queries ------------------------------------------------------------*{color}
{color:#263238} – consider these are the reproduce steps.{color}
{color:#263238}create table default.withdraw({color}
{color:#263238}id string{color}
{color:#263238}) stored as parquet;{color}
{color:#263238} {color}
{color:#263238}
*insert into default.withdraw select 'withdraw\ncash';*{color}
-- note here, added '\n' character
*{color:#263238}--1) result = {color}{color:#6aa84f}success{color}*
{color:#263238}hive> select * from default.withdraw where id like '%withdraw%';{color}
{color:#263238}OK{color}
{color:#263238}withdraw{color}
{color:#263238}cash{color}
{color:#263238}Time taken: 0.078 seconds, Fetched: *1 row(s)*{color}
*--2)* *{color:#263238}result = {color}{color:#cc0000}wrong{color}*
{color:#263238}hive> select * from default.withdraw where id like '%withdraw%cash';{color}
{color:#263238}OK{color}
{color:#263238}Time taken: 0.066 seconds{color}
*--3)* *{color:#263238}result = {color}{color:#6aa84f}success{color}*
{color:#263238}hive> select * from default.withdraw where id like '%cash%';{color}
{color:#263238}OK{color}
{color:#263238}withdraw{color}
{color:#263238}cash{color}
{color:#263238}Time taken: 0.086 seconds, Fetched: 1 row(s){color}
{color:#263238}*-------------------------------------------------- Presto Queries -----------------------------------------------------*{color}
{color:#263238}FYI - Presto (v0.221) is using above table meta store. We tested above queries on presto too. {color}
{color:#263238} {color}
*--1)* *{color:#263238}result ={color}* *{color:#6aa84f}success{color}*
presto> select * from default.withdraw where id like '%withdraw%';
id
----------
withdraw
cash
(1 row)
*--2)* *{color:#263238}result ={color}* *{color:#6aa84f}success{color}*
presto> select * from default.withdraw where id like '%withdraw%cash';
id
----------
withdraw
cash
(1 row)
*--3)* *{color:#263238}result ={color}* *{color:#6aa84f}success{color}*
presto> select * from default.withdraw where id like '%cash%';
id
----------
withdraw
cash
(1 row){color:#263238}
{color}
*--------------------------------------------------* *--------------------------------------------------*
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)