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 771b3c72a fix(csharp/src/Drivers/Apache): Fix setting foreign 
schema/table in GetCrossReference (#2765)
771b3c72a is described below

commit 771b3c72af8a74f6fec76ef72d05f807d6062118
Author: Alex Guo <[email protected]>
AuthorDate: Thu May 1 11:21:48 2025 -0700

    fix(csharp/src/Drivers/Apache): Fix setting foreign schema/table in 
GetCrossReference (#2765)
    
    Currently, calling GetCrossReference with just ForeignCatalogName,
    ForeignSchemaName, and ForeignTableName parameters fails because these
    parameters aren't properly set on the Thrift request.
    
    This PR fixes the typo
    
    Tested E2E locally and it works
    ```
              statement.SqlQuery = "getcrossreference";
              statement.SetOption(ApacheParameters.IsMetadataCommand, "true");
              statement.SetOption(ApacheParameters.ForeignCatalogName, 
"powerbi");
              statement.SetOption(ApacheParameters.ForeignSchemaName, 
"default");
              statement.SetOption(ApacheParameters.ForeignTableName, 
"nyc_taxi_tripdata");
    ```
---
 csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs 
b/csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs
index f4f0f7978..b87862f24 100644
--- a/csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs
+++ b/csharp/src/Drivers/Apache/Hive2/HiveServer2Connection.cs
@@ -1139,11 +1139,11 @@ namespace Apache.Arrow.Adbc.Drivers.Apache.Hive2
             {
                 req.ForeignCatalogName = foreignCatalogName!;
             }
-            if (schemaName != null)
+            if (foreignSchemaName != null)
             {
                 req.ForeignSchemaName = foreignSchemaName!;
             }
-            if (tableName != null)
+            if (foreignTableName != null)
             {
                 req.ForeignTableName = foreignTableName!;
             }

Reply via email to