can't you reuse the PartitionPropertiesAnalyzer and maybe adopt it a bit?