private void ensureEstimateAcceptable(long numRows, long runTimeNumRows) throws HiveException {
    double currentDelta = Math.abs(runTimeNumRows - numRows);
    if (currentDelta <= absErr) {
      return;
    }
    if (runTimeNumRows > 0) {
      double a = currentDelta / runTimeNumRows;
      if (a <= relErr) {
        return;
      }
    }
    throw new HiveException("Estimation error is unacceptable " + numRows + " / " + runTimeNumRows + " with absErr:"
        + absErr+ ", relErr:" + relErr);
  }
Adds an extra check for Explain Analyze queries.
ql/src/java/org/apache/hadoop/hive/ql/hooks/AccurateEstimatesCheckerHook.java