Actually use ascending and numPartitions parameters