Skip to content

Commit

Permalink
feat(datafusion): support dropping schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Oct 26, 2023
1 parent 9c58b29 commit cc6870c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 2 additions & 3 deletions ibis/backends/datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,8 @@ def create_schema(
def drop_schema(
self, name: str, database: str | None = None, force: bool = False
) -> None:
raise com.UnsupportedOperationError(
"DataFusion does not support dropping schemas"
)
schema_name = sg.table(name, db=database)
self.raw_sql(sg.exp.Drop(kind="SCHEMA", this=schema_name, exists=force))

def list_tables(
self,
Expand Down
5 changes: 0 additions & 5 deletions ibis/backends/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,11 +1326,6 @@ def test_create_database(con_create_database):
con_create_database.drop_database(database)


@pytest.mark.notyet(
["datafusion"],
raises=com.UnsupportedOperationError,
reason="datafusion doesn't support dropping schemas",
)
def test_create_schema(con_create_schema):
schema = gen_name("test_create_schema")
con_create_schema.create_schema(schema)
Expand Down

0 comments on commit cc6870c

Please sign in to comment.