Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8442FD116 for ; Fri, 24 May 2013 13:16:38 +0000 (UTC) Received: (qmail 31020 invoked by uid 500); 24 May 2013 13:16:37 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 30667 invoked by uid 500); 24 May 2013 13:16:35 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 30627 invoked by uid 99); 24 May 2013 13:16:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 May 2013 13:16:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of deanwampler@gmail.com designates 209.85.128.44 as permitted sender) Received: from [209.85.128.44] (HELO mail-qe0-f44.google.com) (209.85.128.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 May 2013 13:16:29 +0000 Received: by mail-qe0-f44.google.com with SMTP id 6so2553967qeb.17 for ; Fri, 24 May 2013 06:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Y9Q5TbGOiOR+n+uAMjJMJHXgXIAlpFu1Kx1nH1jrtc4=; b=HZ4n3yQfgeD+qfRU6gJlskEERteb/6ITVPVnwlaatGTp/1oF+DzPfeS0v5jjDfSW0C SdgZi7iYKvUMruWjeH25fAbrjlTk2lBQAwJFnu8atrmL+0O6eZilSRD51u3ul1hzNuVt 1NC3hAQv3acgm2V9NbVC+yZjJbSLUX12Z/K8WtfvM6UN8XnEVIYlxJZuy4zjPDPCYf6E 2SykVVWb41Izc4bIBZvF7C8TpfDrVKZQf4O2DjOtfhe+BtnJgFTo7lpL0caSD4SLBYyD kW5sIL4ni08qm04ojwnC9s2/JbF1zV4GLIT1rGo0aH3ztkpHfqtC5qOOQNi91M5kfnxz fTrw== MIME-Version: 1.0 X-Received: by 10.49.0.244 with SMTP id 20mr18748696qeh.50.1369401368256; Fri, 24 May 2013 06:16:08 -0700 (PDT) Received: by 10.49.99.68 with HTTP; Fri, 24 May 2013 06:16:08 -0700 (PDT) In-Reply-To: References: <1362385827.52205.YahooMailNeo@web194702.mail.sg3.yahoo.com> <1362386275.5150.YahooMailNeo@web194704.mail.sg3.yahoo.com> <1362392680.58000.YahooMailNeo@web194702.mail.sg3.yahoo.com> <1362393994.40284.YahooMailNeo@web194706.mail.sg3.yahoo.com> <1362484093.62705.YahooMailNeo@web194701.mail.sg3.yahoo.com> <1362485373.52473.YahooMailNeo@web194706.mail.sg3.yahoo.com> <1362485890.70318.YahooMailNeo@web194701.mail.sg3.yahoo.com> <1362502593.11290.YahooMailNeo@web194706.mail.sg3.yahoo.com> <1362502925.61539.YahooMailNeo@web194702.mail.sg3.yahoo.com> <1362564010.31506.YahooMailNeo@web194703.mail.sg3.yahoo.com> <1362585758.24571.YahooMailNeo@web194706.mail.sg3.yahoo.com> <1362655630.59684.YahooMailNeo@web194705.mail.sg3.yahoo.com> <1362721390.11663.YahooMailNeo@web194705.mail.sg3.yahoo.com> <1362740013.16235.YahooMailNeo@web194704.mail.sg3.yahoo.com> <1362903547.16452.YahooMailNeo@web194703.mail.sg3.yahoo.com> <1362918367.33445.YahooMailNeo@web194705.mail.sg3.yahoo.com> <1947113031-1362942406-cardhu_decombobulator_blackberry.rim.net-166473606-@b1.c16.bise7.blackberry> <1362972313.67427.YahooMailNeo@web194705.mail.sg3.yahoo.com> <1369393187.8522.YahooMailNeo@web190703.mail.sg3.yahoo.com> <1369394495.72604.YahooMailNeo@web190706.mail.sg3.yahoo.com> Date: Fri, 24 May 2013 08:16:08 -0500 Message-ID: Subject: Re: Difference between like %A% and %a% From: Dean Wampler To: user@hive.apache.org Cc: Sai Sai Content-Type: multipart/alternative; boundary=047d7b33ce2a1c25b504dd769aa3 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33ce2a1c25b504dd769aa3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hortonworks has announced plans to make Hive more SQL compliant. I suspect bugs like this will be addressed sooner or later. It will be necessary to handle backwards compatibility, but that could be handled with a hive property that enables one or the other behaviors. On Fri, May 24, 2013 at 8:07 AM, John Omernik wrote: > I have mentioned this before, and I think this a big miss by the Hive > team. Like, by default in many SQL RDBMS (like MSSQL or MYSQL) is not > case sensitive. Thus when you have new users moving over to Hive, if they > see a command like "like" they will assume similarity (like many other SQ= L > like qualities) and thus false negatives may ensue. Even though it's > different by default (I am ok with this ... I guess, my personal preferen= ce > is that it matches the defaults on other systems, and outside of that > (which I am, in in the end fine with, just grumbly :) ) give us the abili= ty > to set that behavior in the hive-site.xml. That way when an org realizes > that it is different, and their users are all getting false negatives, th= ey > can just update the hive-site and fix the problem rather than have to > include it in training that may or may not work. I've added this comment > to https://issues.apache.org/jira/browse/HIVE-4070#comment-13666278 for > fun. :) > > Please? :) > > > > > On Fri, May 24, 2013 at 7:53 AM, Dean Wampler wrot= e: > >> Your where clause looks at the abbreviation, requiring 'A', not the stat= e >> name. You got the correct answer. >> >> >> On Fri, May 24, 2013 at 6:21 AM, Sai Sai wrote: >> >>> But it should get more results for this: >>> >>> %a% >>> >>> than for >>> >>> %A% >>> >>> Please let me know if i am missing something. >>> Thanks >>> Sai >>> >>> >>> ------------------------------ >>> *From:* Jov >>> *To:* user@hive.apache.org; Sai Sai >>> *Sent:* Friday, 24 May 2013 4:39 PM >>> *Subject:* Re: Difference between like %A% and %a% >>> >>> >>> 2013/5/24 Sai Sai >>> >>> abbreviation l >>> >>> >>> unlike MySQL, string in Hive is case sensitive=EF=BC=8Cso '%A%' is not = equal >>> with '%a%'. >>> >>> >>> -- >>> Jov >>> blog: http:amutu.com/blog >>> >>> >>> >> >> >> -- >> Dean Wampler, Ph.D. >> @deanwampler >> http://polyglotprogramming.com >> > > --=20 Dean Wampler, Ph.D. @deanwampler http://polyglotprogramming.com --047d7b33ce2a1c25b504dd769aa3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hortonworks has announced plans to make Hive more SQL compliant. I su= spect bugs like this will be addressed sooner or later. It will be necessar= y to handle backwards=C2=A0compatibility, but that could be handled with a = hive property that enables one or the other behaviors.

On Fri, May 24, 2013 at 8:07 AM, John= Omernik <john@omernik.com> wrote:
I have mentioned this before, and I think this a big miss = by the Hive team. =C2=A0Like, by default in many SQL RDBMS (like MSSQL or M= YSQL) =C2=A0is not case sensitive. Thus when you have new users moving over= to Hive, if they see a command like "like" they will assume simi= larity (like many other SQL like qualities) and thus false negatives may en= sue. =C2=A0Even though it's different by default (I am ok with this ...= I guess, my personal preference is that it matches the defaults on other s= ystems, and outside of that (which I am, in in the end fine with, just grum= bly :) ) give us the ability to set that=C2=A0behavior=C2=A0in the hive-sit= e.xml. =C2=A0That way when an org realizes that it is different, and their = users are all getting false negatives, they can just update the hive-site a= nd fix the problem rather than have to include it in training that may or m= ay not work. =C2=A0I've added this comment to=C2=A0= https://issues.apache.org/jira/browse/HIVE-4070#comment-13666278 =C2=A0= for fun. :)

Please? :)=C2=A0




On Fri, May 24, 2013 at 7:53 AM, Dean Wampler <deanwampler@gmail.com> wrote:
Your where clause looks at the abbrevi= ation, requiring 'A', not the state name. You got the correct answe= r.


On Fri, May 24, 2= 013 at 6:21 AM, Sai Sai <saigraph@yahoo.in> wrote:
But it should get more r= esults for this:

%a%

than for

%A%

Please let me know if i am missing something.
Thanks
Sai



From: Jov <amutu@amutu.com>
To: user@hive.apache.org; Sai Sai <saigraph@yahoo.in>
Sent: Friday, 24 May 2013 4= :39 PM
Subject: Re: Diff= erence between like %A% and %a%


2013/5/24 Sai Sai <saigraph@yahoo.in>
abbreviation l

unlike MySQL, string in Hive is case = sensitive=EF=BC=8Cso '%A%' is not equal with '%a%'.


--
Jov





--
Dean Wampler, Ph.D.
@deanwampler
http://polyglo= tprogramming.com




--
= Dean Wampler, Ph.D.
@deanwampler
http://polyglotprogramming.com --047d7b33ce2a1c25b504dd769aa3--