Skip to content

Commit 96095b0

Browse files
authored
Merge branch 'main' into add-databricks-query-tags-session-properties
2 parents cdf60cc + 444c50d commit 96095b0

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
@@ -487,7 +487,7 @@ def columns(
487487
.order_by("ordinal_position ASC")
488488
)
489489

490-
self.cursor.execute(query)
490+
self.execute(query.sql(dialect=self.dialect))
491491
result = self.cursor.fetchall()
492492

493493
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
@@ -705,8 +705,5 @@ def test_columns(mocker: MockFixture, make_mocked_engine_adapter: t.Callable):
705705
}
706706

707707
adapter.cursor.execute.assert_called_once_with(
708-
parse_one(
709-
"""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""",
710-
dialect="databricks",
711-
)
708+
"""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"""
712709
)

0 commit comments

Comments
 (0)