diff --git a/ibis/backends/datafusion/__init__.py b/ibis/backends/datafusion/__init__.py index 54d84c1f7405..67c36b7b64b3 100644 --- a/ibis/backends/datafusion/__init__.py +++ b/ibis/backends/datafusion/__init__.py @@ -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, diff --git a/ibis/backends/tests/test_client.py b/ibis/backends/tests/test_client.py index 9aff21f0fb5d..fa38a598cabb 100644 --- a/ibis/backends/tests/test_client.py +++ b/ibis/backends/tests/test_client.py @@ -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)