This is an automated email from the ASF dual-hosted git repository.
curth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new c08fdfca8 fix(csharp/src/Drivers/Databricks): Remove redundant
statement close operation (#2952)
c08fdfca8 is described below
commit c08fdfca8e99ff86decd00f2936c14c71c25fcf1
Author: Alex Guo <[email protected]>
AuthorDate: Tue Jun 10 14:35:14 2025 -0700
fix(csharp/src/Drivers/Databricks): Remove redundant statement close
operation (#2952)
- If DirectResults is set, then after query execution the server will
automatically poll operation status, fetch results, and close the
operation if all rows were fetched
- In the cases where the close operation has already succeeded in the
direct results response, remove the redundant call when disposing the
statement
---
csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs
b/csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs
index f1fbab38c..567277118 100644
--- a/csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs
+++ b/csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs
@@ -344,7 +344,7 @@ namespace Apache.Arrow.Adbc.Drivers.Apache.Hive2
public override void Dispose()
{
- if (OperationHandle != null)
+ if (OperationHandle != null &&
_directResults?.CloseOperation?.Status?.StatusCode !=
TStatusCode.SUCCESS_STATUS)
{
CancellationToken cancellationToken =
ApacheUtility.GetCancellationToken(QueryTimeoutSeconds,
ApacheUtility.TimeUnit.Seconds);
TCloseOperationReq request = new
TCloseOperationReq(OperationHandle);