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 373fde821 fix(csharp/src/Drivers/BigQuery): Fix the bug about 
QueryResultsOptions and script statement (#2796)
373fde821 is described below

commit 373fde82109910741029f7d0b3e36ee879d43252
Author: qifanzhang-ms <[email protected]>
AuthorDate: Fri May 9 11:44:27 2025 +0800

    fix(csharp/src/Drivers/BigQuery): Fix the bug about QueryResultsOptions and 
script statement (#2796)
---
 csharp/src/Drivers/BigQuery/BigQueryStatement.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/csharp/src/Drivers/BigQuery/BigQueryStatement.cs 
b/csharp/src/Drivers/BigQuery/BigQueryStatement.cs
index 0d9e49a5b..797068213 100644
--- a/csharp/src/Drivers/BigQuery/BigQueryStatement.cs
+++ b/csharp/src/Drivers/BigQuery/BigQueryStatement.cs
@@ -118,7 +118,7 @@ namespace Apache.Arrow.Adbc.Drivers.BigQuery
             {
                 // if the authentication token was reset, then we need a new 
job with the latest token
                 BigQueryJob completedJob = await 
Client.GetJobAsync(jobReference);
-                return await completedJob.GetQueryResultsAsync();
+                return await 
completedJob.GetQueryResultsAsync(getQueryResultsOptions);
             };
 
             BigQueryResults results = await 
ExecuteWithRetriesAsync(getJobResults);
@@ -130,8 +130,8 @@ namespace Apache.Arrow.Adbc.Drivers.BigQuery
                 clientMgr.UpdateCredential(Credential);
             });
 
-            // For multi-statement queries, the results.TableReference is null
-            if (results.TableReference == null)
+            // For multi-statement queries, StatementType == "SCRIPT"
+            if (results.TableReference == null || 
job.Statistics.Query.StatementType.Equals("SCRIPT", 
StringComparison.OrdinalIgnoreCase))
             {
                 string statementType = string.Empty;
                 if (Options?.TryGetValue(BigQueryParameters.StatementType, out 
string? statementTypeString) == true)

Reply via email to