File tree Expand file tree Collapse file tree
sqlmesh/core/engine_adapter
tests/core/engine_adapter/integration Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1919
2020from 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
You can’t perform that action at this time.
0 commit comments