15 package com.cloudera.impala.analysis;
17 import java.util.ArrayList;
22 import com.cloudera.impala.thrift.TAccessEvent;
23 import com.cloudera.impala.thrift.TCatalogObjectType;
25 import com.google.common.base.Joiner;
26 import com.google.common.base.Preconditions;
34 ArrayList<ColumnDef> columnDefs, String comment,
QueryStmt viewDefStmt) {
35 super(ifNotExists, tableName, columnDefs, comment, viewDefStmt);
44 viewAnalyzerr.setUseHiveColLabels(
true);
45 viewDefStmt_.analyze(viewAnalyzerr);
47 Preconditions.checkState(
tableName_ != null && !tableName_.isEmpty());
49 owner_ = analyzer.getUser().getName();
56 TCatalogObjectType.VIEW, Privilege.CREATE.toString()));
66 StringBuilder sb =
new StringBuilder();
67 sb.append(
"CREATE VIEW ");
70 sb.append(tableName_.getTbl() +
" (");
73 sb.append(viewDefStmt_.toSql());
final boolean ifNotExists_
final ArrayList< ColumnDef > columnDefs_
static RuntimeEnv INSTANCE
static final String TBL_ALREADY_EXISTS_ERROR_MSG
void analyze(Analyzer analyzer)
void createColumnAndViewDefs(Analyzer analyzer)
final TableName tableName_
void computeLineageGraph(Analyzer analyzer)
CreateViewStmt(boolean ifNotExists, TableName tableName, ArrayList< ColumnDef > columnDefs, String comment, QueryStmt viewDefStmt)