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 3d3bb0e5f feat(csharp/src/Drivers/BigQuery): Add support for 
overriding adbc.bigquery.large_decimals_as_string (#3648)
3d3bb0e5f is described below

commit 3d3bb0e5fd3ecb7b9cb4cbc0af7afb5e2e2bca9b
Author: davidhcoe <[email protected]>
AuthorDate: Thu Nov 6 14:47:35 2025 -0500

    feat(csharp/src/Drivers/BigQuery): Add support for overriding 
adbc.bigquery.large_decimals_as_string (#3648)
    
    - Adds ability for callers to override the
    `adbc.bigquery.large_decimals_as_string` parameter
    
    ---------
    
    Co-authored-by: David Coe <>
---
 csharp/src/Drivers/BigQuery/BigQueryConnection.cs         | 12 ++++++++++--
 csharp/test/Drivers/BigQuery/BigQueryTestConfiguration.cs |  3 +++
 csharp/test/Drivers/BigQuery/BigQueryTestingUtils.cs      |  2 ++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/csharp/src/Drivers/BigQuery/BigQueryConnection.cs 
b/csharp/src/Drivers/BigQuery/BigQueryConnection.cs
index 43082d8be..bc8957f00 100644
--- a/csharp/src/Drivers/BigQuery/BigQueryConnection.cs
+++ b/csharp/src/Drivers/BigQuery/BigQueryConnection.cs
@@ -73,10 +73,18 @@ namespace Apache.Arrow.Adbc.Drivers.BigQuery
 
             TryInitTracerProvider(out _fileActivityListener);
 
-            // add the default value for now and set to true until C# has a 
BigDecimal
-            this.properties[BigQueryParameters.LargeDecimalsAsString] = 
BigQueryConstants.TreatLargeDecimalAsString;
             this.httpClient = new HttpClient();
 
+            if 
(this.properties.TryGetValue(BigQueryParameters.LargeDecimalsAsString, out 
string? sLargeDecimalsAsString) &&
+                bool.TryParse(sLargeDecimalsAsString, out bool 
largeDecimalsAsString))
+            {
+                this.properties[BigQueryParameters.LargeDecimalsAsString] = 
largeDecimalsAsString.ToString();
+            }
+            else
+            {
+                this.properties[BigQueryParameters.LargeDecimalsAsString] = 
BigQueryConstants.TreatLargeDecimalAsString;
+            }
+
             if 
(this.properties.TryGetValue(BigQueryParameters.MaximumRetryAttempts, out 
string? sRetryAttempts) &&
                 int.TryParse(sRetryAttempts, out int retries) &&
                 retries >= 0)
diff --git a/csharp/test/Drivers/BigQuery/BigQueryTestConfiguration.cs 
b/csharp/test/Drivers/BigQuery/BigQueryTestConfiguration.cs
index 74f856e10..e1fa598d4 100644
--- a/csharp/test/Drivers/BigQuery/BigQueryTestConfiguration.cs
+++ b/csharp/test/Drivers/BigQuery/BigQueryTestConfiguration.cs
@@ -84,6 +84,9 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.BigQuery
         [JsonPropertyName("includePublicProjectId")]
         public bool IncludePublicProjectId { get; set; } = false;
 
+        [JsonPropertyName("largeDecimalAsString")]
+        public bool LargeDecimalAsString { get; set; } = true;
+
         /// <summary>
         /// Sets the query timeout (in minutes).
         /// </summary>
diff --git a/csharp/test/Drivers/BigQuery/BigQueryTestingUtils.cs 
b/csharp/test/Drivers/BigQuery/BigQueryTestingUtils.cs
index 394502895..7e26a8870 100644
--- a/csharp/test/Drivers/BigQuery/BigQueryTestingUtils.cs
+++ b/csharp/test/Drivers/BigQuery/BigQueryTestingUtils.cs
@@ -150,6 +150,8 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.BigQuery
 
             parameters.Add(BigQueryParameters.IncludePublicProjectId, 
testEnvironment.IncludePublicProjectId.ToString());
 
+            parameters.Add(BigQueryParameters.LargeDecimalsAsString, 
testEnvironment.LargeDecimalAsString.ToString());
+
             if (!string.IsNullOrEmpty(testEnvironment.LargeResultsDataset))
             {
                 parameters.Add(BigQueryParameters.LargeResultsDataset, 
testEnvironment.LargeResultsDataset);

Reply via email to