If you rebase, you won't need to duplicate these helper methods anymore as they are in InternalAggregation now.