handle shards in aggregation_context the same as in file_context