public static State inferColumnStatsState(State prevState, State newState) {
    if (newState.equals(State.PARTIAL)) {
      return State.PARTIAL;
    }

    if (newState.equals(State.NONE)) {
      if (prevState.equals(State.NONE)) {
        return State.NONE;
      } else {
        return State.PARTIAL;
      }
    }

    if (newState.equals(State.COMPLETE)) {
      if (prevState.equals(State.PARTIAL)) {
        return State.PARTIAL;
      } else {
        return State.COMPLETE;
      }
    }

    return prevState;
  }
Statistics. Describes the output of an operator in terms of size, rows, etc
based on estimates.
ql/src/java/org/apache/hadoop/hive/ql/plan/Statistics.java