hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Koifman (JIRA)" <>
Subject [jira] [Commented] (HIVE-14487) Add REBUILD statement for materialized views
Date Fri, 26 Aug 2016 23:54:20 GMT


Eugene Koifman commented on HIVE-14487:

I don't know the details of how you are implementing things but I'm assuming you store the
view results in some hidden table and the optimizer replaces the view ref in a query with
this table.  Assuming that's the case, one possibility is to keep several such tables.
Each time you rebuild, you write the data to the next available table.  The system would maintain
a pointer somewhere that indicates to the compiler with is the active data set.  Then some
kind of ref counting can be used to truncate one of these tables once all readers of that
specific snapshot are finished.

This has the advantage of never having a "materrizled view unavailable" condition...

This would also fit well with Acid since each txn can add to this ref counter and make sure
it sees a stable world.
This may benefit replication as well.

I think inconsistent data is always bad so i would try to avoid that in the short term in
which ever way is more practical.

> Add REBUILD statement for materialized views
> --------------------------------------------
>                 Key: HIVE-14487
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Materialized views
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Alan Gates
> Support for rebuilding existing materialized views. The statement is the following:
> {code:sql}
> ALTER MATERIALIZED VIEW [db_name.]materialized_view_name REBUILD;
> {code}

This message was sent by Atlassian JIRA

View raw message