Github user icexelloss commented on a diff in the pull request:
https://github.com/apache/spark/pull/18732#discussion_r142583338
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/python/ArrowEvalPythonExec.scala
---
@@ -44,14 +63,17 @@ case class ArrowEvalPythonExec(udfs: Seq[PythonUDF],
output: Seq[Attribute], chi
val schemaOut =
StructType.fromAttributes(output.drop(child.output.length).zipWithIndex
.map { case (attr, i) => attr.withName(s"_$i") })
+ val batchSize = conf.arrowMaxRecordsPerBatch
+ val batchIter = if (batchSize > 0) new BatchIterator(iter, batchSize)
else Iterator(iter)
--- End diff --
This is actually my first implementation. However it turns out I cannot
hold reference to input rows without copy so `grouped` doesn't work (grouped
uses a ArrayBuffer to keep references)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]