Skip to content

Commit 1eb8eec

Browse files
committed
Fix
1 parent b7585a5 commit 1eb8eec

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

sqlmesh/core/engine_adapter/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,7 @@ def _native_df_to_pandas_df(
20112011
"""
20122012
Take a "native" DataFrame (eg Pyspark, Bigframe, Snowpark etc) and convert it to Pandas
20132013
"""
2014-
if isinstance(query_or_df, (exp.Expression, pd.DataFrame)):
2014+
if isinstance(query_or_df, (exp.Query, exp.DerivedTable, pd.DataFrame)):
20152015
return query_or_df
20162016

20172017
# EngineAdapter subclasses that have native DataFrame types should override this

tests/core/engine_adapter/integration/conftest.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from tests.core.engine_adapter.integration import (
2121
TestContext,
22-
TEST_SCHEMA,
2322
generate_pytest_params,
2423
ENGINES,
2524
IntegrationTestEngine,
@@ -72,7 +71,7 @@ def _create(engine_name: str, gateway: str) -> EngineAdapter:
7271
# table and then immediately after trying to insert rows into it. There seems to be a delay between when the
7372
# metastore is made aware of the table and when it responds that it exists. I'm hoping this is not an issue
7473
# in practice on production machines.
75-
if engine_name == "trino":
74+
if not engine_name == "trino":
7675
engine_adapter.DEFAULT_BATCH_SIZE = 1
7776

7877
# Clear our any local db files that may have been left over from previous runs
@@ -145,13 +144,3 @@ def ctx_query_and_df(
145144
create_test_context: t.Callable[[IntegrationTestEngine, str], t.Iterable[TestContext]],
146145
) -> t.Iterable[TestContext]:
147146
yield from create_test_context(*request.param)
148-
149-
150-
# @pytest.fixture
151-
# todo: is anything using this fixture?
152-
def schema(ctx: TestContext) -> str:
153-
schema_name = ctx.schema(TEST_SCHEMA)
154-
ctx.engine_adapter.create_schema(
155-
schema_name
156-
) # note: gets cleaned up when the TestContext fixture gets cleaned up
157-
return schema_name

0 commit comments

Comments
 (0)