Patches for partition stats and pruning