[SPARK-2862] Use shorthand range notation to avoid Scala bug

Is this a documented Scala bug? If so - can we link to it?