Skip to content

Commit b004450

Browse files
Merge branch 'main' into new-main
2 parents 05ff4c5 + 444c50d commit b004450

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

sqlmesh/core/engine_adapter/databricks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def columns(
431431
.order_by("ordinal_position ASC")
432432
)
433433

434-
self.cursor.execute(query)
434+
self.execute(query.sql(dialect=self.dialect))
435435
result = self.cursor.fetchall()
436436

437437
return {row[0]: exp.DataType.build(row[1], dialect=self.dialect) for row in result}

tests/core/engine_adapter/test_databricks.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,5 @@ def test_columns(mocker: MockFixture, make_mocked_engine_adapter: t.Callable):
579579
}
580580

581581
adapter.cursor.execute.assert_called_once_with(
582-
parse_one(
583-
"""SELECT columns.column_name, columns.full_data_type FROM system.information_schema.columns WHERE table_name = 'test_table' AND table_schema = 'test_db' AND table_catalog = 'test_catalog' ORDER BY ordinal_position ASC""",
584-
dialect="databricks",
585-
)
582+
"""SELECT columns.column_name, columns.full_data_type FROM system.information_schema.columns WHERE table_name = 'test_table' AND table_schema = 'test_db' AND table_catalog = 'test_catalog' ORDER BY ordinal_position ASC"""
586583
)

0 commit comments

Comments
 (0)