viirya commented on code in PR #59582:
URL: https://github.com/apache/spark/pull/59582#discussion_r4521841191
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -5754,15 +5754,12 @@ object SQLConf {
val ARROW_PYSPARK_UDF_COLUMNAR_INPUT_ENABLED =
buildConf("spark.sql.execution.arrow.pythonUDF.columnarInput.enabled")
- .doc("When true, Arrow-based Python UDFs (pandas UDFs) can accept " +
- "columnar input directly from upstream operators that produce " +
- "Arrow-backed ColumnarBatch (e.g., DataSource V2 connectors), " +
- "bypassing the ColumnarToRow and ArrowWriter conversion. " +
- "This optimization reduces data transfer overhead between " +
- "the JVM and Python worker processes. It keeps the columns that the
UDFs pass " +
- "through until the results of their batch come back from Python, so it
requires " +
- "an upstream operator whose batches stay valid until then, which a
columnar " +
- "reader does not promise.")
+ .doc("When true, Arrow-based Python UDFs (pandas UDFs) accept columnar
input " +
Review Comment:
Done in 73670610e04: both docs now say "applyInPandasWithState and Arrow
Python UDTFs ignore this config."
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/ArrowEvalPythonExec.scala:
##########
@@ -143,6 +143,7 @@ case class ArrowEvalPythonExec(
output,
output.toStructType,
conf.arrowMaxRecordsPerBatch,
+ conf.arrowMaxBytesPerBatch,
Review Comment:
Done in 73670610e04: the comment now says that only the UDF inputs of
batches whose columns are `ArrowColumnVector`s are written to Python directly,
that each input batch is released once it has been written, and that the
pass-through columns are copied as rows and joined with the results, which are
converted back to columnar batches. It no longer says that the
`ColumnarToRowExec` above releases the batches.
--
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]