Skip to content

Commit

Permalink
test(sql): remove xdist_group marker for .sql tests (#8295)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Feb 12, 2024
1 parent 2ce5bd1 commit 580e42f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 47 deletions.
5 changes: 0 additions & 5 deletions ibis/backends/base/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,3 @@ def _get_operations(cls):
@classmethod
def has_operation(cls, operation: type[ops.Value]) -> bool:
return operation in cls._get_operations()

def _create_temp_view(self, view, definition):
raise NotImplementedError(
f"The {self.name} backend does not implement temporary view creation"
)
23 changes: 0 additions & 23 deletions ibis/backends/risingwave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import atexit
from functools import partial
from itertools import repeat
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -209,28 +208,6 @@ def create_table(
name, schema=schema, source=self, namespace=ops.Namespace(database=database)
).to_expr()

def _get_temp_view_definition(self, name: str, definition):
drop = sge.Drop(
kind="VIEW", exists=True, this=sg.table(name), cascade=True
).sql(self.dialect)

create = sge.Create(
this=sg.to_identifier(name, quoted=self.compiler.quoted),
kind="VIEW",
expression=definition,
replace=False,
).sql(self.dialect)

atexit.register(self._clean_up_tmp_view, name)
return f"{drop}; {create}"

def _clean_up_tmp_view(self, name: str) -> None:
drop = sge.Drop(
kind="VIEW", exists=True, this=sg.table(name), cascade=True
).sql(self.dialect)
with self.begin() as bind:
bind.execute(drop)

def _register_in_memory_table(self, op: ops.InMemoryTable) -> None:
schema = op.schema
if null_columns := [col for col, dtype in schema.items() if dtype.is_null()]:
Expand Down
2 changes: 0 additions & 2 deletions ibis/backends/tests/test_dot_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
["dask", "pandas"], reason="dask and pandas do not accept SQL"
)

pytestmark = [pytest.mark.xdist_group("dot_sql")]

_NAMES = {
"bigquery": "ibis_gbq_testing.functional_alltypes",
"exasol": '"functional_alltypes"',
Expand Down
17 changes: 0 additions & 17 deletions ibis/backends/trino/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,23 +323,6 @@ def _metadata(self, query: str) -> Iterator[tuple[str, dt.DataType]]:
for name, _, _, _, trino_type, *_ in info
)

def _execute_view_creation(self, name, definition):
# NB: trino doesn't support temporary views so we use the less
# desirable method of cleaning up when the Python process exits using
# an atexit hook
#
# the method that defines the atexit hook is defined in the parent
# class
view = sg.Create(
kind="VIEW",
this=sg.table(name, quoted=self.compiler.quoted),
expression=definition,
replace=True,
)

with self._safe_raw_sql(view):
pass

def create_schema(
self, name: str, database: str | None = None, force: bool = False
) -> None:
Expand Down

0 comments on commit 580e42f

Please sign in to comment.