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

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

本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.isMaterializedTable()方法的一些代码示例,展示了Table.isMaterializedTable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.isMaterializedTable()方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:isMaterializedTable

Table.isMaterializedTable介绍

暂无

代码示例

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

  1. private Set<String> getTablesUsed(ParseContext parseCtx) throws SemanticException {
  2. Set<String> tablesUsed = new HashSet<>();
  3. for (TableScanOperator topOp : parseCtx.getTopOps().values()) {
  4. Table table = topOp.getConf().getTableMetadata();
  5. if (!table.isMaterializedTable() && !table.isView()) {
  6. // Add to signature
  7. tablesUsed.add(table.getFullyQualifiedName());
  8. }
  9. }
  10. return tablesUsed;
  11. }

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

  1. Table table, List<ColumnInfo> schema, List<String> neededColumns,
  2. ColumnStatsList colStatsCache) {
  3. if (table.isMaterializedTable()) {
  4. LOG.debug("Materialized table does not contain table statistics");
  5. return null;

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

  1. /**
  2. * Get table level column statistics from metastore for needed columns
  3. * @param table
  4. * - table
  5. * @param schema
  6. * - output schema
  7. * @param neededColumns
  8. * - list of needed columns
  9. * @return column statistics
  10. */
  11. public static List<ColStatistics> getTableColumnStats(
  12. Table table, List<ColumnInfo> schema, List<String> neededColumns) {
  13. if (table.isMaterializedTable()) {
  14. LOG.debug("Materialized table does not contain table statistics");
  15. return null;
  16. }
  17. String dbName = table.getDbName();
  18. String tabName = table.getTableName();
  19. List<String> neededColsInTable = processNeededColumns(schema, neededColumns);
  20. List<ColStatistics> stats = null;
  21. try {
  22. List<ColumnStatisticsObj> colStat = Hive.get().getTableColumnStatistics(
  23. dbName, tabName, neededColsInTable);
  24. stats = convertColStats(colStat, tabName);
  25. } catch (HiveException e) {
  26. LOG.error("Failed to retrieve table statistics: ", e);
  27. stats = null;
  28. }
  29. return stats;
  30. }

相关文章

Table类方法