[#45094023] Refactor DatasetStatistics factory