Strings

I actually simplified the scenario so I could the question,
Our partitions are actually string of dates with hour

So the query was actually
Partition >= '20110301_20' and Partition <= '2011030223'

Still using a single quote wouldn't be advised?


Thanks,

-----Original Message-----
From: Edward Capriolo [mailto:edlinuxg...@gmail.com] 
Sent: Thursday, March 17, 2011 2:59 PM
To: user@hive.apache.org
Subject: Re: We had this wierd behvior

On Thursday, March 17, 2011, Guy Doulberg <guy.doulb...@conduit.com> wrote:
> Hey guys, I have a hive partitioned table. First I ran a query that look like 
> this:Select count(*) From tableWhere field like '%bla%' and (partition>'10' 
> and partition < '20') For this query I gotSome records let's say 640 When I 
> ran this query Select count(*) From tableWhere field like '%bla%' and 
> (partition>'5' and partition < '20') I got none….. Assume that I have 
> partitions 5-20. What am I missing here? Thanks gut

Is your table partitioned by int or string?

'5' is not less then '20' when you are treating them as strings. Don't
put single quotes around numbers

Reply via email to