Skip to content

Commit db1f41e

Browse files
committed
PR feedback
1 parent e7b46b8 commit db1f41e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

sqlmesh/core/engine_adapter/snowflake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def query_factory() -> Query:
300300
temp_table.set("catalog", database)
301301
df_renamed = df.rename(
302302
{
303-
col: exp.to_identifier(col, quoted=True).sql(dialect=self.dialect)
303+
col: exp.to_identifier(col).sql(dialect=self.dialect, identify=True)
304304
for col in columns_to_types
305305
}
306306
) # type: ignore

sqlmesh/core/engine_adapter/spark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def _ensure_pyspark_df(
281281
if pyspark_df:
282282
if columns_to_types:
283283
# ensure Spark dataframe column order matches columns_to_types
284-
pyspark_df = pyspark_df.select(*list(columns_to_types))
284+
pyspark_df = pyspark_df.select(*columns_to_types)
285285
return pyspark_df
286286
df = self.try_get_pandas_df(generic_df)
287287
if df is None:

tests/core/engine_adapter/integration/test_integration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,14 +2736,13 @@ def _use_warehouse_as_state_connection(gateway_name: str, config: Config):
27362736
sqlmesh_context.migrate()
27372737

27382738

2739-
def test_python_model_column_order(ctx: TestContext, tmp_path_factory: pytest.TempPathFactory):
2739+
def test_python_model_column_order(ctx: TestContext, tmp_path: pathlib.Path):
27402740
if ctx.test_type == "pyspark" and ctx.dialect in ("spark", "databricks"):
27412741
# dont skip
27422742
pass
27432743
elif ctx.test_type != "df":
27442744
pytest.skip("python model column order test only needs to be run once per db")
27452745

2746-
tmp_path = tmp_path_factory.mktemp(f"column_order_{ctx.test_id}")
27472746
schema = ctx.add_test_suffix(TEST_SCHEMA)
27482747

27492748
(tmp_path / "models").mkdir()

0 commit comments

Comments
 (0)