toddmeng-db commented on code in PR #2921:
URL: https://github.com/apache/arrow-adbc/pull/2921#discussion_r2132971569
##########
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:
This is to be backwards-compatible with old workspaces where SPARK was the
hive_metastore catalog name. In this case, passing in null lets runtime use the
workspace-set default catalog, which is still typically hive_metastore in newer
dbr.
##########
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:
This is to be backwards-compatible with old workspaces where SPARK was the
user-displayed hive_metastore catalog name. In this case, passing in null lets
runtime use the workspace-set default catalog, which is still typically
hive_metastore in newer dbr.
--
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]