Member since
05-19-2021
1
Post
1
Kudos Received
0
Solutions
05-19-2021
10:46 AM
1 Kudo
Hi, I'm having trouble refreshing a materialized view as it doesn't update properly. I'm going to show an example. Base table "test_table" with 2 rows: create table test_table
as
select 1 as c
union
select 2 as c Then I create a materialized view from "test_table": create materialized view test_mv
as
select *
from test_table If I query test_mv, it show 2 rows, it's ok. But if I truncate the original table, and then rebuild the materialized view, the query over the materialized view keeps showing 2 rows! truncate table test_table;
alter materialized view test_mv rebuild;
select * from test_mv; -- <-- This query returns 2 rows!! Any ideas on what's happening? I'm running hive version 3.1.0.3.1.0.0-78 Thanks!
... View more
Labels:
- Labels:
-
Apache Hive