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

@chenghao-intel assigned this to me, check PR #2284 for previous discussion