amaliujia commented on code in PR #40692:
URL: https://github.com/apache/spark/pull/40692#discussion_r1160953776


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/SparkResult.scala:
##########
@@ -60,13 +61,19 @@ private[sql] class SparkResult[T](
   private def processResponses(stopOnFirstNonEmptyResponse: Boolean): Boolean 
= {
     while (responses.hasNext) {
       val response = responses.next()
+      if (response.hasSchema) {
+        structType =

Review Comment:
   This logic actual becomes more confusing now about the structType assingment.
   
   I am wondering if it should becomes something like
   ```
   if (response.hasSchema)
   else if (response.hasArrowBatch)
   ```
   
   I am becoming not sure as the code is 
   1. if response gives a schema, use it
   2. if response didn't give then try arrow's schema 
   
   then how to handle when both `response has a schema` and `arrow has schema` 
is not clear, or which one should be used first, etc.



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