Examples of addToColumnStats()


Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

      if (fetchColStats) {
        colStats = getTableColumnStats(table, schema, neededColumns);
      }

      stats.setColumnStatsState(deriveStatType(colStats, neededColumns));
      stats.addToColumnStats(colStats);
    } else if (partList != null) {
      // For partitioned tables, get the size of all the partitions after pruning
      // the partitions that are not required
      long nr = 0;
      long ds = 0;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

          for (String partName : partNames) {
            List<ColStatistics> partStat = partStats.get(partName);
            haveFullStats &= (partStat != null);
            if (partStat != null) {
              stats.updateColumnStatsState(deriveStatType(partStat, neededColumns));
              stats.addToColumnStats(partStat);
            }
          }
        }
      }
      // There are some partitions with no state (or we didn't fetch any state).
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

      }
      // There are some partitions with no state (or we didn't fetch any state).
      // Update the stats with empty list to reflect that in the state/initialize structures.
      if (!haveFullStats) {
        List<ColStatistics> emptyStats = Lists.<ColStatistics>newArrayList();
        stats.addToColumnStats(emptyStats);
        stats.updateColumnStatsState(deriveStatType(emptyStats, neededColumns));
      }
    }
    return stats;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

              cs.setNumNulls(0);
              cs.setAvgColLen(StatsUtils.getAvgColLenOfFixedLengthTypes(colType));
              aggColStats.add(cs);
            }
          }
          stats.addToColumnStats(aggColStats);

          // if UDAF present and if column expression map is empty then it must
          // be full aggregation query like count(*) in which case number of
          // rows will be 1
          if (colExprMap.isEmpty()) {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

            }
          }

          // add the new aggregate column and recompute data size
          if (aggColStats.size() > 0) {
            stats.addToColumnStats(aggColStats);

            // only if the column stats is available, update the data size from
            // the column stats
            if (!stats.getColumnStatsState().equals(Statistics.State.NONE)) {
              updateStats(stats, stats.getNumRows(), true, gop);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

      // infer if any column can be primary key based on column statistics
      inferAndSetPrimaryKey(stats.getNumRows(), colStats);

      stats.setColumnStatsState(deriveStatType(colStats, neededColumns));
      stats.addToColumnStats(colStats);
    } else if (partList != null) {
      // For partitioned tables, get the size of all the partitions after pruning
      // the partitions that are not required
      long nr = 0;
      long ds = 0;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

          // add partition column stats
          addParitionColumnStats(conf, neededColumns, referencedColumns, schema, table, partList,
              emptyStats);

          stats.addToColumnStats(emptyStats);
          stats.updateColumnStatsState(deriveStatType(emptyStats, referencedColumns));
        } else {
          List<ColumnStatisticsObj> colStats = aggrStats.getColStats();
          if (colStats.size() != neededColumns.size()) {
            LOG.debug("Column stats requested for : " + neededColumns.size() + " columns. Able to" +
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

              columnStats);

          // infer if any column can be primary key based on column statistics
          inferAndSetPrimaryKey(stats.getNumRows(), columnStats);

          stats.addToColumnStats(columnStats);
          State colState = deriveStatType(columnStats, referencedColumns);
          if (aggrStats.getPartsFound() != partNames.size() && colState != State.NONE) {
            LOG.debug("Column stats requested for : " + partNames.size() + " partitions. "
                + "Able to retrieve for " + aggrStats.getPartsFound() + " partitions");
            colState = State.PARTIAL;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

      if (fetchColStats) {
        colStats = getTableColumnStats(table, schema, neededColumns);
      }

      stats.setColumnStatsState(deriveStatType(colStats, neededColumns));
      stats.addToColumnStats(colStats);
    } else if (partList != null) {
      // For partitioned tables, get the size of all the partitions after pruning
      // the partitions that are not required
      long nr = 0;
      long ds = 0;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.Statistics.addToColumnStats()

          for (String partName : partNames) {
            List<ColStatistics> partStat = partStats.get(partName);
            haveFullStats &= (partStat != null);
            if (partStat != null) {
              stats.updateColumnStatsState(deriveStatType(partStat, neededColumns));
              stats.addToColumnStats(partStat);
            }
          }
        }
      }
      // There are some partitions with no state (or we didn't fetch any state).
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.