File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
csharp/src/Drivers/Databricks Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,6 @@ protected override TOpenSessionReq CreateSessionRequest()
370
370
return req ;
371
371
}
372
372
373
-
374
373
protected override async Task HandleOpenSessionResponse ( TOpenSessionResp ? session )
375
374
{
376
375
await base . HandleOpenSessionResponse ( session ) ;
@@ -392,9 +391,10 @@ protected override async Task HandleOpenSessionResponse(TOpenSessionResp? sessio
392
391
393
392
// Since Databricks Namespace was introduced in newer versions, we fallback to USE SCHEMA to set default schema
394
393
// in case the server version is too low.
395
- private async Task SetSchema ( string schemaName ) {
394
+ private async Task SetSchema ( string schemaName )
395
+ {
396
396
using var statement = new DatabricksStatement ( this ) ;
397
- statement . SqlQuery = $ "USE { schemaName } ";
397
+ statement . SqlQuery = $ "USE ` { schemaName } ` ";
398
398
await statement . ExecuteUpdateAsync ( ) ;
399
399
}
400
400
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ public DatabricksStatement(DatabricksConnection connection)
44
44
// set the catalog name for legacy compatibility
45
45
// TODO: use catalog and schema fields in hiveserver2 connection instad of DefaultNamespace so we don't need to cast
46
46
var defaultNamespace = ( ( DatabricksConnection ) Connection ) . DefaultNamespace ;
47
- if ( defaultNamespace != null ) {
47
+ if ( defaultNamespace != null )
48
+ {
48
49
if ( CatalogName == null )
49
50
{
50
51
CatalogName = defaultNamespace . CatalogName ;
You can’t perform that action at this time.
0 commit comments