private static void updateTableColumnsStatsInternal(Configuration conf, ColumnStatistics colStats,
      Map<String, String> newParams, String validWriteIds, long writeId) throws MetaException {
    String catName = colStats.getStatsDesc().isSetCatName() ? normalizeIdentifier(
        colStats.getStatsDesc().getCatName()) : getDefaultCatalog(conf);
    String dbName = normalizeIdentifier(colStats.getStatsDesc().getDbName());
    String tblName = normalizeIdentifier(colStats.getStatsDesc().getTableName());
    if (!shouldCacheTable(catName, dbName, tblName)) {
      return;
    }
    Table table = sharedCache.getTableFromCache(catName, dbName, tblName);
    if (table == null) {
      // The table is not yet loaded in cache
      return;
    }

    boolean isTxn = TxnUtils.isTransactionalTable(table.getParameters());
    if (isTxn && validWriteIds != null) {
      if (!areTxnStatsSupported) {
        StatsSetupConst.setBasicStatsState(newParams, StatsSetupConst.FALSE);
      } else {
        String errorMsg = ObjectStore
            .verifyStatsChangeCtx(TableName.getDbTable(dbName, tblName), table.getParameters(), newParams, writeId,
                validWriteIds, true);
        if (errorMsg != null) {
          throw new MetaException(errorMsg);
        }
        if (!ObjectStore.isCurrentStatsValidForTheQuery(newParams, table.getWriteId(), validWriteIds, true)) {
          // Make sure we set the flag to invalid regardless of the current value.
          StatsSetupConst.setBasicStatsState(newParams, StatsSetupConst.FALSE);
          LOG.info("Removed COLUMN_STATS_ACCURATE from the parameters of the table " + table.getDbName() + "." + table
              .getTableName());
        }
      }
    }

    table.setWriteId(writeId);
    table.setParameters(newParams);
    sharedCache.alterTableInCache(catName, dbName, tblName, table);
    sharedCache.updateTableColStatsInCache(catName, dbName, tblName, colStats.getStatsObj());
  }
getPartitionSpecsByFilterAndProjection interface is currently non-cacheable.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java