Re: Apache Hive 2.3.4 - Issue with combination of Like operator & newline (\n) character in data

2019-07-29 Thread Shankar Mane
It will worked when your aware of data. This solution is not suitable when
column data is unknown and dynamic in nature.

On Mon, 29 Jul 2019, 21:50 Sungwoo Park,  wrote:

> Not a solution, but one can use \n in the search string, e.g.:
>
> select * from default.withdraw where id like '%withdraw\ncash';
> select * from default.withdraw where id like '%withdraw%\ncash';
> select * from default.withdraw where id like '%withdraw%\n%cash';
>
> --- Sungwoo
>
>
> On Tue, Jul 30, 2019 at 12:58 AM Shankar Mane  wrote:
>
>> Can anyone looking at this issue ?
>>
>> On Sat, Jul 20, 2019 at 9:08 AM Shankar Mane  wrote:
>>
>>> Have created jira at https://issues.apache.org/jira/browse/HIVE-22008
>>> 
>>>
>>> On Wed, 17 Jul 2019, 16:44 Shankar Mane,  wrote:
>>>
 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





Re: Apache Hive 2.3.4 - Issue with combination of Like operator & newline (\n) character in data

2019-07-29 Thread Sungwoo Park
Not a solution, but one can use \n in the search string, e.g.:

select * from default.withdraw where id like '%withdraw\ncash';
select * from default.withdraw where id like '%withdraw%\ncash';
select * from default.withdraw where id like '%withdraw%\n%cash';

--- Sungwoo


On Tue, Jul 30, 2019 at 12:58 AM Shankar Mane  wrote:

> Can anyone looking at this issue ?
>
> On Sat, Jul 20, 2019 at 9:08 AM Shankar Mane  wrote:
>
>> Have created jira at https://issues.apache.org/jira/browse/HIVE-22008
>> 
>>
>> On Wed, 17 Jul 2019, 16:44 Shankar Mane,  wrote:
>>
>>> 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
>>>
>>>
>>>


Re: Apache Hive 2.3.4 - Issue with combination of Like operator & newline (\n) character in data

2019-07-29 Thread Shankar Mane
Can anyone looking at this issue ?

On Sat, Jul 20, 2019 at 9:08 AM Shankar Mane  wrote:

> Have created jira at https://issues.apache.org/jira/browse/HIVE-22008
> 
>
> On Wed, 17 Jul 2019, 16:44 Shankar Mane,  wrote:
>
>> 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
>>
>>
>>


Re: Performance issue about DESC FORMATTED query

2019-07-29 Thread Yuya Ebihara
Posted the same issue on Stackoverflow so that I can update the detail.
https://stackoverflow.com/questions/57250948/performance-issue-about-describe-formatted-query

BR,
Yuya

On Fri, Jul 26, 2019 at 10:22 PM Yuya Ebihara  wrote:

> Hi, this is my first post to Hive community.
>
> We faced performance issue about DESC FORMATTED a table having a lot of
> partitions on Hive 1.2.1000.
> It tries to get partition names as the internal code and it takes few
> minutes, but I don't think the operation is necessary. Is there a way to
> avoid it?
>
> This issue happens on only interactive Hiveserver2 and just Hiveserver2 is
> not problem.
>
> BR,
> Yuya Ebihara
>