eric-wang-1990 commented on code in PR #2921:
URL: https://github.com/apache/arrow-adbc/pull/2921#discussion_r2130946723


##########
csharp/src/Drivers/Databricks/DatabricksStatement.cs:
##########
@@ -46,14 +46,10 @@ public DatabricksStatement(DatabricksConnection connection)
             var defaultNamespace = 
((DatabricksConnection)Connection).DefaultNamespace;
             if (defaultNamespace != null)
             {
-                if (CatalogName == null)
+                if (CatalogName == null && 
connection.EnableMultipleCatalogSupport)
                 {
                     CatalogName = defaultNamespace.CatalogName;

Review Comment:
   So I realize that for GetCrossReference, it has a CatalogName and 
ForeignCatalog name, in our case where we will only assign foreign 
catalog/schema/table to the call, and in those case the catalogName is null and 
we should not override.
   I've tested it, it seems working fine even we assign the catalogName where 
the actual parentTable is in another catalog. Let's add a TODO here just noting 
that.



##########
csharp/src/Drivers/Databricks/DatabricksConnection.cs:
##########
@@ -165,9 +165,16 @@ private void ValidateProperties()
             // Parse default namespace
             string? defaultCatalog = null;
             string? defaultSchema = null;
-            Properties.TryGetValue(AdbcOptions.Connection.CurrentCatalog, out 
defaultCatalog);
+            // only if enableMultipleCatalogSupport is true, do we supply 
catalog from connection properties
+            if (_enableMultipleCatalogSupport)
+            {
+                Properties.TryGetValue(AdbcOptions.Connection.CurrentCatalog, 
out defaultCatalog);
+            }
             Properties.TryGetValue(AdbcOptions.Connection.CurrentDbSchema, out 
defaultSchema);
 
+            // SPARK is a special catalog name - rely on server to return a 
default catalog if there is one
+            defaultCatalog = HandleSparkCatalog(defaultCatalog);

Review Comment:
   Just curious: How would some use pass in SPARK as initial catalog? They are 
passing SPARK in PowerBI UI?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to