When we have `sort`, `partialSort` or `mapReduce` in a plan, they are taken into account when calculating cost even though they will be eliminated later.