wangyum commented on code in PR #47699:
URL: https://github.com/apache/spark/pull/47699#discussion_r1712914601
##########
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/RowSetUtils.scala:
##########
@@ -135,10 +135,8 @@ object RowSetUtils {
case _ =>
var i = 0
- val rowSize = rows.length
val values = new java.util.ArrayList[String](rowSize)
- while (i < rowSize) {
- val row = rows(i)
+ rows.foreach { row =>
Review Comment:
It seems the `Array`'s performance is much better than `Seq`.
```
toColumnBasedSet time: 138, toRowBasedSet time: 73
```
--
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]