FAQ
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,

Search Discussions

  • John Sichi at Dec 28, 2010 at 7:22 pm
    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,

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedDec 28, '10 at 8:18a
activeDec 28, '10 at 7:22p
posts2
users2
websitehive.apache.org

2 users in discussion

John Sichi: 1 post Neil Xu: 1 post

People

Translate

site design / logo © 2021 Grokbase