public static int initUpdatedColumnStatement(MPartitionColumnStatistics mStatsObj,
                                                      PreparedStatement pst) throws SQLException {
    int colIdx = 1;
    if (mStatsObj.getAvgColLen() != null) {
      pst.setObject(colIdx++, mStatsObj.getAvgColLen());
    }
    if (mStatsObj.getLongHighValue() != null) {
      pst.setObject(colIdx++, mStatsObj.getLongHighValue());
    }
    if (mStatsObj.getDoubleHighValue() != null) {
      pst.setObject(colIdx++, mStatsObj.getDoubleHighValue());
    }
    pst.setLong(colIdx++, mStatsObj.getLastAnalyzed());
    if (mStatsObj.getLongLowValue() != null) {
      pst.setObject(colIdx++, mStatsObj.getLongLowValue());
    }
    if (mStatsObj.getDoubleLowValue() != null) {
      pst.setObject(colIdx++, mStatsObj.getDoubleLowValue());
    }
    if (mStatsObj.getDecimalLowValue() != null) {
      pst.setObject(colIdx++, mStatsObj.getDecimalLowValue());
    }
    if (mStatsObj.getDecimalHighValue() != null) {
      pst.setObject(colIdx++, mStatsObj.getDecimalHighValue());
    }
    if (mStatsObj.getMaxColLen() != null) {
      pst.setObject(colIdx++, mStatsObj.getMaxColLen());
    }
    if (mStatsObj.getNumDVs() != null) {
      pst.setObject(colIdx++, mStatsObj.getNumDVs());
    }
    if (mStatsObj.getBitVector() != null) {
      pst.setObject(colIdx++, mStatsObj.getBitVector());
    }
    if (mStatsObj.getHistogram() != null) {
      pst.setObject(colIdx++, mStatsObj.getHistogram());
    }
    if (mStatsObj.getNumFalses() != null) {
      pst.setObject(colIdx++, mStatsObj.getNumFalses());
    }
    if (mStatsObj.getNumTrues() != null) {
      pst.setObject(colIdx++, mStatsObj.getNumTrues());
    }
    if (mStatsObj.getNumNulls() != null) {
      pst.setObject(colIdx++, mStatsObj.getNumNulls());
    }
    pst.setString(colIdx++, mStatsObj.getEngine());
    return colIdx;
  }
This class contains conversion logic that creates Thrift stat objects from
JDO stat objects and plain arrays from DirectSQL.
It is hidden here so that we wouldn't have to look at it in elsewhere.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/StatObjectConverter.java