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

x33g5p2x  于2022-01-20 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(200)

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

Hive.getTableColumnStatistics介绍

暂无

代码示例

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

List<ColumnStatisticsObj> colStat = Hive.get().getTableColumnStatistics(
  dbName, tabName, colStatsToRetrieve, false);
stats = convertColStats(colStat, tabName);

代码示例来源: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;
}

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

} else {
 cols = Hive.getFieldsFromDeserializer(colPath, deserializer);
 colStats = db.getTableColumnStatistics(dbTab[0].toLowerCase(), dbTab[1].toLowerCase(), colNames);

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

} else {
 cols = Hive.getFieldsFromDeserializer(colPath, deserializer);
 colStats = db.getTableColumnStatistics(
   dbTab[0].toLowerCase(), dbTab[1].toLowerCase(), colNames, false);

代码示例来源:origin: com.facebook.presto.hive/hive-apache

/**
 * 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) {
 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;
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

colNames.add(colName.toLowerCase());
if (null == part) {
 colStats = db.getTableColumnStatistics(dbTab[0].toLowerCase(), dbTab[1].toLowerCase(), colNames);
} else {
 List<String> partitions = new ArrayList<String>();

相关文章

Hive类方法