Skip to content

Commit e00e860

Browse files
authored
chore: fix tests to include dataframe (#5423)
1 parent bf40bbe commit e00e860

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sqlmesh/core/engine_adapter/clickhouse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ def query_factory() -> Query:
112112
storage_format=exp.var("MergeTree"),
113113
**kwargs,
114114
)
115+
ordered_df = df[list(source_columns_to_types)]
115116

116-
self.cursor.client.insert_df(temp_table.sql(dialect=self.dialect), df=df)
117+
self.cursor.client.insert_df(temp_table.sql(dialect=self.dialect), df=ordered_df)
117118

118119
return exp.select(*self._casted_columns(target_columns_to_types, source_columns)).from_(
119120
temp_table

tests/core/engine_adapter/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def ctx_df(
148148
yield from create_test_context(*request.param)
149149

150150

151-
@pytest.fixture(params=list(generate_pytest_params(ENGINES, query=True, df=False)))
151+
@pytest.fixture(params=list(generate_pytest_params(ENGINES, query=True, df=True)))
152152
def ctx_query_and_df(
153153
request: FixtureRequest,
154154
create_test_context: t.Callable[[IntegrationTestEngine, str], t.Iterable[TestContext]],

0 commit comments

Comments
 (0)