hh-cn opened a new issue, #6661: URL: https://github.com/apache/kyuubi/issues/6661
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues. ### What would you like to be improved? https://issues.apache.org/jira/browse/SPARK-47085 reported an issue, scala Seq.apply has O(n) complexity when accessing to a non-IndexedSeq with `val row = rows(idx)`, in [this PR 6077](https://github.com/apache/kyuubi/pull/6077 ), the row-based TRowSet has been fixed, but TColumnGenerator.getColumnToList was missed. In my localhost test, it will cost 150s to iterate a Hive JDBC statement resultSet (100000 rows, 20+ columns) with `statement.setFetchSize(10000)`, but only took 3s with `statement.setFetchSize(100)`, this is a serious performance issue. ### How should we improve? In trait TColumnGenerator.getColumnToList, convert the while loop ``` while (idx < rowSize) { val row = rows(idx) ... } ``` to a foreach like this ``` rows.foreach { row => .... } ``` will resolve this ### Are you willing to submit PR? - [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve. - [X] No. I cannot submit a PR at this time. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
