MapReduce containment and aggregation