viirya commented on a change in pull request #27089: [SPARK-30414][SQL]
ParquetRowConverter optimizations: arrays, maps, plus misc. constant factors
URL: https://github.com/apache/spark/pull/27089#discussion_r363562692
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetRowConverter.scala
##########
@@ -517,20 +521,18 @@ private[parquet] class ParquetRowConverter(
override def end(): Unit = updater.set(new
GenericArrayData(currentArray.toArray))
- // NOTE: We can't reuse the mutable `ArrayBuffer` here and must
instantiate a new buffer for the
- // next value. `Row.copy()` only copies row cells, it doesn't do deep
copy to objects stored
- // in row cells.
- override def start(): Unit = currentArray = ArrayBuffer.empty[Any]
Review comment:
I think it depends on `currentArray.toArray` copies the elements or not?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]