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