eric-wang-1990 commented on code in PR #3241:
URL: https://github.com/apache/arrow-adbc/pull/3241#discussion_r2270752334


##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs:
##########
@@ -117,9 +117,13 @@ private async Task<QueryResult> 
ExecuteQueryAsyncInternal(CancellationToken canc
         {
             return await this.TraceActivityAsync(async _ =>
             {
+                // Clear any previous query result
+                ClearCurrentQueryResult();

Review Comment:
   Add a comment this exist only for multiple executes on a single statement 
instance scenario.



##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs:
##########
@@ -142,7 +146,8 @@ private async Task<QueryResult> 
ExecuteQueryAsyncInternal(CancellationToken canc
                     metadata = await 
HiveServer2Connection.GetResultSetMetadataAsync(OperationHandle!, 
Connection.Client, cancellationToken);
                 }
                 Schema schema = GetSchemaFromMetadata(metadata);
-                return new QueryResult(-1, Connection.NewReader(this, schema, 
metadata));
+                _currentQueryResult = new QueryResult(-1, 
Connection.NewReader(this, schema, metadata));

Review Comment:
   For Power BI usecase, it should always be one time call and any new 
statement executed should be on its own instance. But within the ADBC driver, a 
statement can be executed multiple times, with different sqlQuery context, in 
those scenario I think we should enforce a single-use semantic, just like the 
link Todd links.



-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to