InvisibleProgrammer commented on code in PR #6393:
URL: https://github.com/apache/hive/pull/6393#discussion_r3493768890
##########
iceberg/iceberg-handler/src/test/queries/positive/mv_iceberg_native.q:
##########
@@ -0,0 +1,97 @@
+--! qt:dataset:src
+--! qt:dataset:part
+
+-- MV metadata is stored in Iceberg
+-- SORT_QUERY_RESULTS
+--! qt:replace:/(\s+'uuid'=')\S+('\s*)/$1#Masked#$2/
+--! qt:replace:/(\s+uuid\s+)\S+(\s*)/$1#Masked#$2/
+--! qt:replace:/(.*snapshotId=)\S+(\}.*)/$1#SnapshotId#$2/
+
+set hive.explain.user=false;
+set hive.support.concurrency=true;
+set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.iceberg.materializedview.metadata.location=iceberg;
+set hive.external.table.purge.default=true;
+
+
+drop materialized view if exists mat_native;
+drop table if exists tbl_ice_native;
+
+create table tbl_ice_native(a int, b string, c int) stored by iceberg stored
as orc tblproperties ('format-version'='1');
+insert into tbl_ice_native values (1, 'one', 50), (2, 'two', 51), (3, 'three',
52), (4, 'four', 53), (5, 'five', 54);
+
+explain
+create materialized view mat_native stored by iceberg stored as orc
tblproperties ('format-version'='1') as
+select b, c from tbl_ice_native where c > 52;
+
+create materialized view mat_native stored by iceberg stored as orc
tblproperties ('format-version'='1', 'max-staleness-ms'='1000') as
+select b, c from tbl_ice_native where c > 52;
+
+select * from mat_native;
+
+
+SHOW TABLES;
+SHOW MATERIALIZED VIEWS;
+
+show create table mat_native;
+describe formatted mat_native;
+
+drop materialized view mat_native;
+
+create materialized view mat_native_orc stored by iceberg stored as orc
tblproperties ('format-version'='1', 'max-staleness-ms'='1000') as
+select b, c from tbl_ice_native where c > 52;
+
+select * from mat_native_orc;
+
+show create table mat_native_orc;
+explain show create table mat_native_orc;
+describe extended mat_native_orc;
+explain describe formatted mat_native_orc;
Review Comment:
I just wanted to check if explain works.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]