BryanCutler commented on a change in pull request #24826: 
[SPARK-27870][SQL][PYTHON] Add a runtime buffer size configuration for Pandas 
UDFs
URL: https://github.com/apache/spark/pull/24826#discussion_r292585005
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/python/ArrowPythonRunner.scala
 ##########
 @@ -48,6 +49,12 @@ class ArrowPythonRunner(
   extends BasePythonRunner[Iterator[InternalRow], ColumnarBatch](
     funcs, evalType, argOffsets) {
 
+  override val bufferSize: Int = SQLConf.get.pandasUDFBufferSize
+  require(
+    bufferSize >= 4,
 
 Review comment:
   Would it be possible to just check internally if the buffer size is 0 and 
less than 4, then don't create a BufferedWriter in Scala at all? If someone 
really wants a buffer size that low, I think it makes sense to just turn off 
buffering.

----------------------------------------------------------------
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]

Reply via email to