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

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

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

private Set<String> getTablesUsed(ParseContext parseCtx) throws SemanticException {
 Set<String> tablesUsed = new HashSet<>();
 for (TableScanOperator topOp : parseCtx.getTopOps().values()) {
  Table table = topOp.getConf().getTableMetadata();
  if (!table.isMaterializedTable() && !table.isView()) {
   // Add to signature
   tablesUsed.add(table.getFullyQualifiedName());
  }
 }
 return tablesUsed;
}

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

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

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

/**
 * Get table level column statistics from metastore for needed columns
 * @param table
 *          - table
 * @param schema
 *          - output schema
 * @param neededColumns
 *          - list of needed columns
 * @return column statistics
 */
public static List<ColStatistics> getTableColumnStats(
  Table table, List<ColumnInfo> schema, List<String> neededColumns) {
 if (table.isMaterializedTable()) {
  LOG.debug("Materialized table does not contain table statistics");
  return null;
 }
 String dbName = table.getDbName();
 String tabName = table.getTableName();
 List<String> neededColsInTable = processNeededColumns(schema, neededColumns);
 List<ColStatistics> stats = null;
 try {
  List<ColumnStatisticsObj> colStat = Hive.get().getTableColumnStatistics(
    dbName, tabName, neededColsInTable);
  stats = convertColStats(colStat, tabName);
 } catch (HiveException e) {
  LOG.error("Failed to retrieve table statistics: ", e);
  stats = null;
 }
 return stats;
}

相关文章

微信公众号

最新文章

更多

Table类方法