[SPARK-3412][SQL]add missing row api

@chenghao-intel assigned this to me, check PR #2284 for previous discussion
Can't this just be `override def getAs[T](i: Int): T = values(i).boxed.asInstanceOf[T]`?