Do you mind explaining a bit more the case where these two will not match? I'm just wondering if it make more sense to check this invariant inside of the `getPartitions` function of `ShuffleRDD.scala` - but maybe there are other code paths where this could get messed up that don't go through that.