pan3793 commented on code in PR #4754:
URL: https://github.com/apache/kyuubi/pull/4754#discussion_r1174516899
##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/sql/kyuubi/SparkDatasetHelper.scala:
##########
@@ -68,17 +67,18 @@ object SparkDatasetHelper extends Logging {
def toArrowBatchRdd(plan: SparkPlan): RDD[Array[Byte]] = {
val schemaCaptured = plan.schema
// TODO: SparkPlan.session introduced in SPARK-35798, replace with
SparkPlan.session once we
- // drop Spark-3.1.x support.
+ // drop Spark 3.1 support.
val maxRecordsPerBatch =
SparkSession.active.sessionState.conf.arrowMaxRecordsPerBatch
val timeZoneId = SparkSession.active.sessionState.conf.sessionLocalTimeZone
+ val maxBatchSizePerBatch = maxBatchSize
plan.execute().mapPartitionsInternal { iter =>
- val context = TaskContext.get()
- ArrowConverters.toBatchIterator(
+ KyuubiArrowConverters.toBatchIterator(
iter,
schemaCaptured,
maxRecordsPerBatch,
- timeZoneId,
- context)
+ maxBatchSizePerBatch,
Review Comment:
```suggestion
maxBatchSize,
```
##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/sql/kyuubi/SparkDatasetHelper.scala:
##########
@@ -68,17 +67,18 @@ object SparkDatasetHelper extends Logging {
def toArrowBatchRdd(plan: SparkPlan): RDD[Array[Byte]] = {
val schemaCaptured = plan.schema
// TODO: SparkPlan.session introduced in SPARK-35798, replace with
SparkPlan.session once we
- // drop Spark-3.1.x support.
+ // drop Spark 3.1 support.
val maxRecordsPerBatch =
SparkSession.active.sessionState.conf.arrowMaxRecordsPerBatch
val timeZoneId = SparkSession.active.sessionState.conf.sessionLocalTimeZone
+ val maxBatchSizePerBatch = maxBatchSize
Review Comment:
```suggestion
```
--
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]