code: private PartitionStatistics updatePartitionStatistics(PartitionStatistics oldPartitionStats, PartitionStatistics newPartitionStats)
      {
          HiveBasicStatistics oldBasicStatistics = oldPartitionStats.getBasicStatistics();
          HiveBasicStatistics newBasicStatistics = newPartitionStats.getBasicStatistics();
          HiveBasicStatistics updatedBasicStatistics = new HiveBasicStatistics(
                  firstPresent(newBasicStatistics.getFileCount(), oldBasicStatistics.getFileCount()),
                  firstPresent(newBasicStatistics.getRowCount(), oldBasicStatistics.getRowCount()),
                  firstPresent(newBasicStatistics.getInMemoryDataSizeInBytes(), oldBasicStatistics.getInMemoryDataSizeInBytes()),
                  firstPresent(newBasicStatistics.getOnDiskDataSizeInBytes(), oldBasicStatistics.getOnDiskDataSizeInBytes()));
          return new PartitionStatistics(updatedBasicStatistics, newPartitionStats.getColumnStatistics());
      }
docs: TODO: Collect file count, on-disk size and in-memory size during ANALYZE