diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/engine/result/TRowSetGenerator.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/engine/result/TRowSetGenerator.scala index e2492036b12..4f5701919eb 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/engine/result/TRowSetGenerator.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/engine/result/TRowSetGenerator.scala @@ -43,13 +43,13 @@ trait TRowSetGenerator[SchemaT, RowT, ColumnT] def toRowBasedSet(rows: Seq[RowT], schema: SchemaT): TRowSet = { val tRows = rows.map { row => - var j = 0 + var i = 0 val columnSize = getColumnSizeFromSchemaType(schema) val tColumnValues = new JArrayList[TColumnValue](columnSize) - while (j < columnSize) { - val columnValue = toTColumnValue(row, j, schema) + while (i < columnSize) { + val columnValue = toTColumnValue(row, i, schema) tColumnValues.add(columnValue) - j += 1 + i += 1 } new TRow(tColumnValues) }.asJava