This is an automated email from the ASF dual-hosted git repository.

lidavidm 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 4e0175fb3 fix(go/adbc/driver/snowflake): fix precision/scale in table 
schema (#1656)
4e0175fb3 is described below

commit 4e0175fb31d61b904d86187a53af08f4c1fe0c2a
Author: Ruoxuan Wang <[email protected]>
AuthorDate: Mon Mar 25 20:11:41 2024 +0800

    fix(go/adbc/driver/snowflake): fix precision/scale in table schema (#1656)
---
 csharp/src/Client/SchemaConverter.cs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/csharp/src/Client/SchemaConverter.cs 
b/csharp/src/Client/SchemaConverter.cs
index cc71f4990..a46eb1c91 100644
--- a/csharp/src/Client/SchemaConverter.cs
+++ b/csharp/src/Client/SchemaConverter.cs
@@ -70,16 +70,16 @@ namespace Apache.Arrow.Adbc.Client
                     f.HasMetadata
                 )
                 {
-                    if (f.Metadata.TryGetValue("precision", out string 
precisionKey))
+                    if (f.Metadata.TryGetValue("precision", out string 
precisionValue))
                     {
-                        if(!string.IsNullOrEmpty(precisionKey))
-                            row[SchemaTableColumn.NumericPrecision] = 
Convert.ToInt32(f.Metadata[precisionKey]);
+                        if(!string.IsNullOrEmpty(precisionValue))
+                            row[SchemaTableColumn.NumericPrecision] = 
Convert.ToInt32(precisionValue);
                     }
 
-                    if(f.Metadata.TryGetValue("scale", out string scaleKey))
+                    if(f.Metadata.TryGetValue("scale", out string scaleValue))
                     {
-                        if(!string.IsNullOrEmpty(scaleKey))
-                            row[SchemaTableColumn.NumericScale] = 
Convert.ToInt32(f.Metadata[scaleKey]);
+                        if(!string.IsNullOrEmpty(scaleValue))
+                            row[SchemaTableColumn.NumericScale] = 
Convert.ToInt32(scaleValue);
                     }
                 }
                 else if (f.DataType is Decimal128Type decimal128Type)

Reply via email to