You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zeruibao (via GitHub)" <gi...@apache.org> on 2025/09/24 22:33:36 UTC
Re: [PR] [SPARK-53638][SS][PYTHON] Limit the byte size of arrow batch for TWS to avoid OOM [spark]
zeruibao commented on code in PR #52391:
URL: https://github.com/apache/spark/pull/52391#discussion_r2377225128
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/streaming/ApplyInPandasWithStatePythonRunner.scala:
##########
@@ -106,12 +106,14 @@ class ApplyInPandasWithStatePythonRunner(
}
private val arrowMaxRecordsPerBatch = sqlConf.arrowMaxRecordsPerBatch
+ private val arrowMaxBytesPerBatch = sqlConf.arrowMaxBytesPerBatch
// applyInPandasWithState has its own mechanism to construct the Arrow RecordBatch instance.
// Configurations are both applied to executor and Python worker, set them to the worker conf
// to let Python worker read the config properly.
override protected val workerConf: Map[String, String] = initialWorkerConf +
- (SQLConf.ARROW_EXECUTION_MAX_RECORDS_PER_BATCH.key -> arrowMaxRecordsPerBatch.toString)
+ (SQLConf.ARROW_EXECUTION_MAX_RECORDS_PER_BATCH.key -> arrowMaxRecordsPerBatch.toString) +
+ (SQLConf.ARROW_EXECUTION_MAX_RECORDS_PER_BATCH.key -> arrowMaxBytesPerBatch.toString)
Review Comment:
good catch! Just fixed it.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org