Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/19603#discussion_r147589355 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala --- @@ -591,6 +591,9 @@ case class MapObjects private( case _ => inputData.dataType } + // `MapObjects` generates a while loop to traverse the elements of the input collection. We + // need to take care of Seq and List because they may have O(n) complexity for indexed accessing + // like `list.get(1)`. Here we use Iterator to travers Seq and List. --- End diff -- nit: travers -> traverse
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org