hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Pawar <nitinpawar...@gmail.com>
Subject Re: query behaviors with subquery in clause
Date Thu, 20 Aug 2015 09:16:49 GMT
any help guys ?

On Thu, Aug 13, 2015 at 2:52 PM, Nitin Pawar <nitinpawar432@gmail.com>
wrote:

> Hi,
>
> right now hive does not support the equality clause in sub-queries.
> for ex:  select * from A where date = (select max(date) from B)
>
> It though supports IN clause
> select * from A where date in (select max(date) from B)
>
> in table A the table is partitioned by date column so i was hoping that
> when I apply IN clause it would look only for that partition but it is
> reading the entire table
>
> select * from A where date='2015-08-09' ... reads one partition
> select * from A where date in ('2015-08-09') ... reads one partitions
> select * from A where date in (select max(date) from B) ... reads all
> partitions from A
>
> am I missing anything error or am i doing something wrong ?
>
> --
> Nitin Pawar
>



-- 
Nitin Pawar

Mime
View raw message