You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Amlan Mandal <am...@fourint.com> on 2011/02/04 11:38:38 UTC
case insensitive string equality
(Please pardon my ignorance as I am Hive newbie)
When I do Hive QL
select * from app_log where partner='abc';
and
select * from app_log where partner='ABC'
I get different result. That means by default Hive string equality is case
sensitive . Is there any GLOBAL/Hive wide setting so that string equality is
case insensitive?
Amlan
Re: case insensitive string equality
Posted by Amlan Mandal <am...@fourint.com>.
Jamie,
Yes I can use LIKE or lcase /lower but instead of using that every time it
would have better if I could use some setting. (like collation or something
in MySQL)
Amlan
On Fri, Feb 4, 2011 at 4:19 PM, Jamie Cockrill <ja...@gmail.com>wrote:
> Amlan,
>
> In: http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF#String_Functions
>
> <http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF#String_Functions>It
> looks like you could use 'RLIKE' to achieve what you're after if you make a
> case-insensitive java regular expression.
>
> Thanks,
>
> Jamie
>
>
> On 4 February 2011 10:38, Amlan Mandal <am...@fourint.com> wrote:
>
>> (Please pardon my ignorance as I am Hive newbie)
>>
>> When I do Hive QL
>> select * from app_log where partner='abc';
>> and
>> select * from app_log where partner='ABC'
>>
>> I get different result. That means by default Hive string equality is case
>> sensitive . Is there any GLOBAL/Hive wide setting so that string equality is
>> case insensitive?
>>
>> Amlan
>>
>
>
Re: case insensitive string equality
Posted by Jamie Cockrill <ja...@gmail.com>.
Amlan,
In: http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF#String_Functions
<http://wiki.apache.org/hadoop/Hive/LanguageManual/UDF#String_Functions>It
looks like you could use 'RLIKE' to achieve what you're after if you make a
case-insensitive java regular expression.
Thanks,
Jamie
On 4 February 2011 10:38, Amlan Mandal <am...@fourint.com> wrote:
> (Please pardon my ignorance as I am Hive newbie)
>
> When I do Hive QL
> select * from app_log where partner='abc';
> and
> select * from app_log where partner='ABC'
>
> I get different result. That means by default Hive string equality is case
> sensitive . Is there any GLOBAL/Hive wide setting so that string equality is
> case insensitive?
>
> Amlan
>