hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Sichi <jsi...@fb.com>
Subject Re: Question about View in Hive 0.6
Date Tue, 28 Dec 2010 19:22:27 GMT
It runs the same as a nested select.  Currently, since Hive doesn't do any relational common
subexpression elimination, it will be executed twice.  In the example below, this can be a
good thing, since cond1 and cond2 can be pushed down separately.

JVS

On Dec 28, 2010, at 12:18 AM, Neil Xu wrote:

> in hive 0.6, we can create view for tables, views are actually run as a subquery when
querying data, is it optimized in hive that a view is executed only once in a single query?
Thanks in advance!
> such as:
>   select *
>   from (
>       select x,y
>       from view1
>       where cond1
> 
>       union all
> 
>       select x,y
>       from view1
>       where cond2
>   )
> 
> Neil,
> 


Mime
View raw message