@Override
  public void scheduledQueryProgress(ScheduledQueryProgressInfo info) throws InvalidOperationException, MetaException {
    ensureScheduledQueriesEnabled();
    boolean commited = false;
    try {
      openTransaction();
      MScheduledExecution execution = pm.getObjectById(MScheduledExecution.class, info.getScheduledExecutionId());
      if (!validateStateChange(execution.getState(), info.getState())) {
        throw new InvalidOperationException("Invalid state change: " + execution.getState() + "=>" + info.getState());
      }
      execution.setState(info.getState());
      if (info.isSetExecutorQueryId()) {
        execution.setExecutorQueryId(info.getExecutorQueryId());
      }
      if (info.isSetErrorMessage()) {
        execution.setErrorMessage(abbreviateErrorMessage(info.getErrorMessage(), 1000));
      }

      switch (info.getState()) {
      case INITED:
      case EXECUTING:
        execution.setLastUpdateTime((int) (System.currentTimeMillis() / 1000));
        break;
      case FAILED:
      case FINISHED:
      case TIMED_OUT:
        execution.setEndTime((int) (System.currentTimeMillis() / 1000));
        execution.setLastUpdateTime(null);
        execution.getScheduledQuery().setActiveExecution(null);
        break;
      default:
        throw new InvalidOperationException("invalid state: " + info.getState());
      }
      pm.makePersistent(execution);

      processScheduledQueryPolicies(info);

      commited = commitTransaction();
    } finally {
      rollbackAndCleanup(commited, null);
    }
  }
Return true if the current statistics in the Metastore is valid
for the query of the given "txnId" and "queryValidWriteIdList".

Note that a statistics entity is valid iff
the stats is written by the current query or
the conjunction of the following two are true:
~ COLUMN_STATE_ACCURATE(CSA) state is true
~ Isolation-level (snapshot) compliant with the query
@param part                   MPartition of the stats entity
@param queryValidWriteIdList  valid writeId list of the query
@Precondition   "part" should be retrieved from the PARTITIONS table.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java