public class HiveMaterializedViewUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static HiveRelOptMaterialization |
augmentMaterializationWithTimeInformation(HiveRelOptMaterialization materialization,
String validTxnsList,
MaterializationSnapshot snapshot)
Method to enrich the materialization query contained in the input with
its invalidation.
|
static boolean |
checkPrivilegeForMaterializedViews(List<Table> cachedMVTableList)
Validate if given materialized view has SELECT privileges for current user
|
static org.apache.calcite.rel.RelNode |
copyNodeNewCluster(org.apache.calcite.plan.RelOptCluster optCluster,
org.apache.calcite.rel.RelNode node)
Method that will recreate the plan rooted at node using the cluster given
as a parameter.
|
static List<HiveRelOptMaterialization> |
deriveGroupingSetsMaterializedViews(HiveRelOptMaterialization materialization)
If a materialization does not contain grouping sets, it returns the materialization
itself.
|
static Table |
extractTable(org.apache.calcite.plan.RelOptMaterialization materialization) |
static MaterializationSnapshot |
getSnapshotOf(DDLOperationContext context,
Set<TableName> tables) |
static Boolean |
isOutdatedMaterializedView(String validTxnsList,
HiveTxnManager txnMgr,
Hive db,
Set<TableName> tablesUsed,
Table materializedViewTable)
Utility method that returns whether a materialized view is outdated (true), not outdated
(false), or it cannot be determined (null).
|
public static Table extractTable(org.apache.calcite.plan.RelOptMaterialization materialization)
public static Boolean isOutdatedMaterializedView(String validTxnsList, HiveTxnManager txnMgr, Hive db, Set<TableName> tablesUsed, Table materializedViewTable) throws HiveException
HiveExceptionpublic static HiveRelOptMaterialization augmentMaterializationWithTimeInformation(HiveRelOptMaterialization materialization, String validTxnsList, MaterializationSnapshot snapshot) throws LockException
LockExceptionpublic static List<HiveRelOptMaterialization> deriveGroupingSetsMaterializedViews(HiveRelOptMaterialization materialization)
public static org.apache.calcite.rel.RelNode copyNodeNewCluster(org.apache.calcite.plan.RelOptCluster optCluster,
org.apache.calcite.rel.RelNode node)
public static boolean checkPrivilegeForMaterializedViews(List<Table> cachedMVTableList) throws HiveException
cachedMVTableList - HiveExceptionpublic static MaterializationSnapshot getSnapshotOf(DDLOperationContext context, Set<TableName> tables) throws HiveException
HiveExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.