org.apache.hadoop.hive.ql.metadata.Table.isMaterializedView()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(246)

本文整理了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

Table.isMaterializedView介绍

暂无

代码示例

代码示例来源:origin: apache/hive

  1. public boolean isMaterializedView() {
  2. return table.isMaterializedView();
  3. }

代码示例来源:origin: apache/drill

  1. public boolean isMaterializedView() {
  2. return table.isMaterializedView();
  3. }
  4. }

代码示例来源:origin: apache/hive

  1. public TYPE getDescType() {
  2. if (table.isView() || table.isMaterializedView()) {
  3. return TYPE.VIEW;
  4. }
  5. return TYPE.TABLE;
  6. }

代码示例来源:origin: apache/drill

  1. @Override
  2. public void run() {
  3. for (Table table : tables) {
  4. if (table.isMaterializedView()) {
  5. addMaterializedView(table);
  6. }
  7. }
  8. }
  9. }

代码示例来源:origin: apache/drill

  1. public TYPE getTableType() {
  2. if (table.isView() || table.isMaterializedView()) {
  3. return TYPE.VIEW;
  4. }
  5. return TYPE.TABLE;
  6. }

代码示例来源:origin: apache/hive

  1. public static String getTableInformation(Table table, boolean isOutputPadded) {
  2. StringBuilder tableInfo = new StringBuilder(DEFAULT_STRINGBUILDER_SIZE);
  3. // Table Metadata
  4. tableInfo.append(LINE_DELIM).append("# Detailed Table Information").append(LINE_DELIM);
  5. getTableMetaDataInformation(tableInfo, table, isOutputPadded);
  6. // Storage information.
  7. tableInfo.append(LINE_DELIM).append("# Storage Information").append(LINE_DELIM);
  8. getStorageDescriptorInfo(tableInfo, table.getTTable().getSd());
  9. if (table.isView() || table.isMaterializedView()) {
  10. tableInfo.append(LINE_DELIM).append(table.isView() ? "# View Information" : "# Materialized View Information").append(LINE_DELIM);
  11. getViewInfo(tableInfo, table);
  12. }
  13. return tableInfo.toString();
  14. }

代码示例来源:origin: apache/drill

  1. public static String getTableInformation(Table table, boolean isOutputPadded) {
  2. StringBuilder tableInfo = new StringBuilder(DEFAULT_STRINGBUILDER_SIZE);
  3. // Table Metadata
  4. tableInfo.append(LINE_DELIM).append("# Detailed Table Information").append(LINE_DELIM);
  5. getTableMetaDataInformation(tableInfo, table, isOutputPadded);
  6. // Storage information.
  7. tableInfo.append(LINE_DELIM).append("# Storage Information").append(LINE_DELIM);
  8. getStorageDescriptorInfo(tableInfo, table.getTTable().getSd());
  9. if (table.isView() || table.isMaterializedView()) {
  10. tableInfo.append(LINE_DELIM).append("# View Information").append(LINE_DELIM);
  11. getViewInfo(tableInfo, table);
  12. }
  13. return tableInfo.toString();
  14. }

代码示例来源:origin: apache/hive

  1. private static void getViewInfo(StringBuilder tableInfo, Table tbl) {
  2. formatOutput("Original Query:", tbl.getViewOriginalText(), tableInfo);
  3. formatOutput("Expanded Query:", tbl.getViewExpandedText(), tableInfo);
  4. if (tbl.isMaterializedView()) {
  5. formatOutput("Rewrite Enabled:", tbl.isRewriteEnabled() ? "Yes" : "No", tableInfo);
  6. formatOutput("Outdated for Rewriting:", tbl.isOutdatedForRewriting() == null ? "Unknown"
  7. : tbl.isOutdatedForRewriting() ? "Yes" : "No", tableInfo);
  8. }
  9. }

代码示例来源:origin: apache/hive

  1. @Override
  2. public void visit(RelNode node, int ordinal, RelNode parent) {
  3. if (node instanceof TableScan) {
  4. // We can continue
  5. // TODO: Need to check that this is the same MV that we are rebuilding
  6. RelOptHiveTable hiveTable = (RelOptHiveTable) node.getTable();
  7. if (!hiveTable.getHiveTableMD().isMaterializedView()) {
  8. // If it is not a materialized view, we do not rewrite it
  9. throw new ReturnedValue(false);
  10. }
  11. if (containsAggregate && !AcidUtils.isFullAcidTable(hiveTable.getHiveTableMD())) {
  12. // If it contains an aggregate and it is not a full acid table,
  13. // we do not rewrite it (we need MERGE support)
  14. throw new ReturnedValue(false);
  15. }
  16. } else if (node instanceof Project) {
  17. // We can continue
  18. super.visit(node, ordinal, parent);
  19. } else {
  20. throw new ReturnedValue(false);
  21. }
  22. }
  23. }.go(union.getInput(1));

代码示例来源:origin: apache/hive

  1. if (table.isMaterializedView()) {

代码示例来源:origin: apache/hive

  1. if (isView() || isMaterializedView()) {
  2. assert (getViewOriginalText() != null);
  3. assert (getViewExpandedText() != null);

代码示例来源:origin: apache/hive

  1. if (!tab.isMaterializedView()) {

代码示例来源:origin: apache/drill

  1. assert (getViewOriginalText() != null);
  2. assert (getViewExpandedText() != null);
  3. } else if (isMaterializedView()) {
  4. assert(getViewOriginalText() != null);
  5. assert(getViewExpandedText() == null);

代码示例来源:origin: apache/hive

  1. if (ts.tableHandle.isView() || ts.tableHandle.isMaterializedView()) {
  2. throw new SemanticException(ErrorMsg.DML_AGAINST_VIEW.getMsg());

代码示例来源:origin: apache/hive

  1. } else if (tbl.isMaterializedView()) {
  2. if (!dropTbl.getExpectMaterializedView()) {
  3. if (dropTbl.getIfExists()) {
  4. if (tbl != null) {
  5. if (tbl.isMaterializedView()) {
  6. HiveMaterializedViewsRegistry.get().dropMaterializedView(tbl);

代码示例来源:origin: apache/hive

  1. mq.getNodeTypes(rel);
  2. for (RelNode scan : nodeTypes.get(TableScan.class)) {
  3. if (((RelOptHiveTable) scan.getTable()).getHiveTableMD().isMaterializedView()) {
  4. usesMaterializedViews = true;
  5. break;

代码示例来源:origin: apache/hive

  1. throw new SemanticException("View definition references temporary table " + alias);
  2. if (table.isMaterializedView()) {
  3. throw new SemanticException("View definition references materialized view " + alias);

代码示例来源:origin: apache/hive

  1. if (tbl.isMaterializedView()) {
  2. CreationMetadata cm =
  3. new CreationMetadata(MetaStoreUtils.getDefaultCatalog(conf), tbl.getDbName(),

代码示例来源:origin: apache/hive

  1. String[] qualViewName = { dbName, table.getTableName() };
  2. String dbDotView = BaseSemanticAnalyzer.getDotName(qualViewName);
  3. if (table.isMaterializedView()) {
  4. this.createViewDesc = new CreateViewDesc(dbDotView,
  5. table.getAllCols(),

代码示例来源:origin: apache/drill

  1. String[] qualViewName = { dbName, table.getTableName() };
  2. String dbDotView = BaseSemanticAnalyzer.getDotName(qualViewName);
  3. if (table.isMaterializedView()) {
  4. this.createViewDesc = new CreateViewDesc(dbDotView,
  5. table.getAllCols(),

相关文章

Table类方法