heyihong commented on code in PR #52271:
URL: https://github.com/apache/spark/pull/52271#discussion_r2340463706


##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/service/ExecuteHolder.scala:
##########
@@ -76,6 +76,34 @@ private[connect] class ExecuteHolder(
     }
   }
 
+  /**
+   * If result chunking is enabled, it will split large arrow batches into 
smaller chunks in
+   * responses.
+   */
+  lazy val resultChunkingEnabled: Boolean = {
+    
sessionHolder.session.conf.get(CONNECT_SESSION_RESULT_CHUNKING_MAX_CHUNK_SIZE) 
> 0 &&
+    request.getRequestOptionsList.asScala.exists { option =>
+      option.hasResultChunkingOptions &&
+      option.getResultChunkingOptions.getAllowArrowBatchChunking == true

Review Comment:
   nit: `option.getResultChunkingOptions.getAllowArrowBatchChunking` should be 
sufficient, since the default value is false. `option.getResultChunkingOptions` 
will return a default message even if it is not set. In proto3, you won’t get a 
null pointer when accessing an unset field.



-- 
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-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to