本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.isMaterializedView()
方法的一些代码示例,展示了Table.isMaterializedView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.isMaterializedView()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:isMaterializedView
暂无
代码示例来源:origin: apache/hive
public boolean isMaterializedView() {
return table.isMaterializedView();
}
代码示例来源:origin: apache/drill
public boolean isMaterializedView() {
return table.isMaterializedView();
}
}
代码示例来源:origin: apache/hive
public TYPE getDescType() {
if (table.isView() || table.isMaterializedView()) {
return TYPE.VIEW;
}
return TYPE.TABLE;
}
代码示例来源:origin: apache/drill
@Override
public void run() {
for (Table table : tables) {
if (table.isMaterializedView()) {
addMaterializedView(table);
}
}
}
}
代码示例来源:origin: apache/drill
public TYPE getTableType() {
if (table.isView() || table.isMaterializedView()) {
return TYPE.VIEW;
}
return TYPE.TABLE;
}
代码示例来源:origin: apache/hive
public static String getTableInformation(Table table, boolean isOutputPadded) {
StringBuilder tableInfo = new StringBuilder(DEFAULT_STRINGBUILDER_SIZE);
// Table Metadata
tableInfo.append(LINE_DELIM).append("# Detailed Table Information").append(LINE_DELIM);
getTableMetaDataInformation(tableInfo, table, isOutputPadded);
// Storage information.
tableInfo.append(LINE_DELIM).append("# Storage Information").append(LINE_DELIM);
getStorageDescriptorInfo(tableInfo, table.getTTable().getSd());
if (table.isView() || table.isMaterializedView()) {
tableInfo.append(LINE_DELIM).append(table.isView() ? "# View Information" : "# Materialized View Information").append(LINE_DELIM);
getViewInfo(tableInfo, table);
}
return tableInfo.toString();
}
代码示例来源:origin: apache/drill
public static String getTableInformation(Table table, boolean isOutputPadded) {
StringBuilder tableInfo = new StringBuilder(DEFAULT_STRINGBUILDER_SIZE);
// Table Metadata
tableInfo.append(LINE_DELIM).append("# Detailed Table Information").append(LINE_DELIM);
getTableMetaDataInformation(tableInfo, table, isOutputPadded);
// Storage information.
tableInfo.append(LINE_DELIM).append("# Storage Information").append(LINE_DELIM);
getStorageDescriptorInfo(tableInfo, table.getTTable().getSd());
if (table.isView() || table.isMaterializedView()) {
tableInfo.append(LINE_DELIM).append("# View Information").append(LINE_DELIM);
getViewInfo(tableInfo, table);
}
return tableInfo.toString();
}
代码示例来源:origin: apache/hive
private static void getViewInfo(StringBuilder tableInfo, Table tbl) {
formatOutput("Original Query:", tbl.getViewOriginalText(), tableInfo);
formatOutput("Expanded Query:", tbl.getViewExpandedText(), tableInfo);
if (tbl.isMaterializedView()) {
formatOutput("Rewrite Enabled:", tbl.isRewriteEnabled() ? "Yes" : "No", tableInfo);
formatOutput("Outdated for Rewriting:", tbl.isOutdatedForRewriting() == null ? "Unknown"
: tbl.isOutdatedForRewriting() ? "Yes" : "No", tableInfo);
}
}
代码示例来源:origin: apache/hive
@Override
public void visit(RelNode node, int ordinal, RelNode parent) {
if (node instanceof TableScan) {
// We can continue
// TODO: Need to check that this is the same MV that we are rebuilding
RelOptHiveTable hiveTable = (RelOptHiveTable) node.getTable();
if (!hiveTable.getHiveTableMD().isMaterializedView()) {
// If it is not a materialized view, we do not rewrite it
throw new ReturnedValue(false);
}
if (containsAggregate && !AcidUtils.isFullAcidTable(hiveTable.getHiveTableMD())) {
// If it contains an aggregate and it is not a full acid table,
// we do not rewrite it (we need MERGE support)
throw new ReturnedValue(false);
}
} else if (node instanceof Project) {
// We can continue
super.visit(node, ordinal, parent);
} else {
throw new ReturnedValue(false);
}
}
}.go(union.getInput(1));
代码示例来源:origin: apache/hive
if (table.isMaterializedView()) {
代码示例来源:origin: apache/hive
if (isView() || isMaterializedView()) {
assert (getViewOriginalText() != null);
assert (getViewExpandedText() != null);
代码示例来源:origin: apache/hive
if (!tab.isMaterializedView()) {
代码示例来源:origin: apache/drill
assert (getViewOriginalText() != null);
assert (getViewExpandedText() != null);
} else if (isMaterializedView()) {
assert(getViewOriginalText() != null);
assert(getViewExpandedText() == null);
代码示例来源:origin: apache/hive
if (ts.tableHandle.isView() || ts.tableHandle.isMaterializedView()) {
throw new SemanticException(ErrorMsg.DML_AGAINST_VIEW.getMsg());
代码示例来源:origin: apache/hive
} else if (tbl.isMaterializedView()) {
if (!dropTbl.getExpectMaterializedView()) {
if (dropTbl.getIfExists()) {
if (tbl != null) {
if (tbl.isMaterializedView()) {
HiveMaterializedViewsRegistry.get().dropMaterializedView(tbl);
代码示例来源:origin: apache/hive
mq.getNodeTypes(rel);
for (RelNode scan : nodeTypes.get(TableScan.class)) {
if (((RelOptHiveTable) scan.getTable()).getHiveTableMD().isMaterializedView()) {
usesMaterializedViews = true;
break;
代码示例来源:origin: apache/hive
throw new SemanticException("View definition references temporary table " + alias);
if (table.isMaterializedView()) {
throw new SemanticException("View definition references materialized view " + alias);
代码示例来源:origin: apache/hive
if (tbl.isMaterializedView()) {
CreationMetadata cm =
new CreationMetadata(MetaStoreUtils.getDefaultCatalog(conf), tbl.getDbName(),
代码示例来源:origin: apache/hive
String[] qualViewName = { dbName, table.getTableName() };
String dbDotView = BaseSemanticAnalyzer.getDotName(qualViewName);
if (table.isMaterializedView()) {
this.createViewDesc = new CreateViewDesc(dbDotView,
table.getAllCols(),
代码示例来源:origin: apache/drill
String[] qualViewName = { dbName, table.getTableName() };
String dbDotView = BaseSemanticAnalyzer.getDotName(qualViewName);
if (table.isMaterializedView()) {
this.createViewDesc = new CreateViewDesc(dbDotView,
table.getAllCols(),
内容来源于网络,如有侵权,请联系作者删除!