SPARK-4968: takeOrdered to skip reduce step in case mappers return no partitions