birschick-bq commented on code in PR #2275:
URL: https://github.com/apache/arrow-adbc/pull/2275#discussion_r1817083052


##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Reader.cs:
##########
@@ -88,22 +88,20 @@ public HiveServer2Reader(
             // Await the fetch response
             TFetchResultsResp response = await FetchNext(_statement, 
cancellationToken);
 
-            // Build the current batch
-            RecordBatch result = CreateBatch(response, out int fetchedRows);
-
-            if ((_statement.BatchSize > 0 && fetchedRows < 
_statement.BatchSize) || fetchedRows == 0)
+            int columnCount = GetColumnCount(response);
+            int rowCount = GetRowCount(response, columnCount); ;
+            if ((_statement.BatchSize > 0 && rowCount < _statement.BatchSize) 
|| rowCount == 0)

Review Comment:
   For the servers I tested, Apache Spark is setting 
`TFetchResultsResp.HasMoreRows` to `false` on the first and any subsequent 
response. I used this code as an example: 
https://impala.apache.org/doc/html/simba_8cc_source.html



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

Reply via email to