birschick-bq commented on code in PR #3241: URL: https://github.com/apache/arrow-adbc/pull/3241#discussion_r2264131756
########## 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: We should either enforce the "single-use" semantic or refactor to make it safe for the created objects to work independently of the Statement. Another problem is see is that if ExecuteQuery[Async] is called more than once, the OperationHandle will get updated for the subsequent call and it will no longer be correct for the initial call. -- 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