use of com.facebook.presto.sql.planner.plan.TableWriterNode.RefreshMaterializedViewReference in project presto by prestodb.
the class LogicalPlanner method createRefreshMaterializedViewPlan.
private RelationPlan createRefreshMaterializedViewPlan(Analysis analysis, RefreshMaterializedView refreshMaterializedViewStatement) {
Analysis.RefreshMaterializedViewAnalysis viewAnalysis = analysis.getRefreshMaterializedViewAnalysis().get();
TableHandle tableHandle = viewAnalysis.getTarget();
List<ColumnHandle> columnHandles = viewAnalysis.getColumns();
WriterTarget target = new RefreshMaterializedViewReference(tableHandle, metadata.getTableMetadata(session, tableHandle).getTable());
return buildInternalInsertPlan(tableHandle, columnHandles, viewAnalysis.getQuery(), analysis, target);
}
Aggregations