Repository: ibis-project/ibis

Issue:
feat: read_delta for datafusion
### Is your feature request related to a problem?

#6354 skipped the datafusion backend; this feature is for adding it

### Describe the solution you'd like

```
ibis.set_backend("datafusion")
t = ibis.read_delta("path/to/delta")
```

### What version of ibis are you running?

n/a

### What backend(s) are you using, if any?

datafusion

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct


Discussion:

Resolving patch:
diff --git a/ibis/backends/datafusion/__init__.py b/ibis/backends/datafusion/__init__.py
--- a/ibis/backends/datafusion/__init__.py
+++ b/ibis/backends/datafusion/__init__.py
@@ -243,6 +243,47 @@ def read_parquet(
         self._context.register_parquet(table_name, path, **kwargs)
         return self.table(table_name)
 
+    def read_delta(
+        self, source_table: str | Path, table_name: str | None = None, **kwargs: Any
+    ) -> ir.Table:
+        """Register a Delta Lake table as a table in the current database.
+
+        Parameters
+        ----------
+        source_table
+            The data source. Must be a directory
+            containing a Delta Lake table.
+        table_name
+            An optional name to use for the created table. This defaults to
+            a sequentially generated name.
+        **kwargs
+            Additional keyword arguments passed to deltalake.DeltaTable.
+
+        Returns
+        -------
+        ir.Table
+            The just-registered table
+        """
+        source_table = normalize_filename(source_table)
+
+        table_name = table_name or gen_name("read_delta")
+
+        # Our other backends support overwriting views / tables when reregistering
+        self._context.deregister_table(table_name)
+
+        try:
+            from deltalake import DeltaTable
+        except ImportError:
+            raise ImportError(
+                "The deltalake extra is required to use the "
+                "read_delta method. You can install it using pip:\n\n"
+                "pip install ibis-framework[deltalake]\n"
+            )
+
+        delta_table = DeltaTable(source_table, **kwargs)
+
+        return self.register(delta_table.to_pyarrow_dataset(), table_name=table_name)
+
     def _get_frame(
         self,
         expr: ir.Expr,
diff --git a/ibis/backends/duckdb/__init__.py b/ibis/backends/duckdb/__init__.py
--- a/ibis/backends/duckdb/__init__.py
+++ b/ibis/backends/duckdb/__init__.py
@@ -489,8 +489,7 @@ def read_delta(
         table_name
             An optional name to use for the created table. This defaults to
             a sequentially generated name.
-        kwargs
-            Additional keyword arguments passed to DuckDB loading function.
+        **kwargs
             Additional keyword arguments passed to deltalake.DeltaTable.
 
         Returns


Test patch:
diff --git a/ibis/backends/tests/test_export.py b/ibis/backends/tests/test_export.py
--- a/ibis/backends/tests/test_export.py
+++ b/ibis/backends/tests/test_export.py
@@ -325,7 +325,6 @@ def test_to_pyarrow_decimal(backend, dtype, pyarrow_dtype):
     [
         "bigquery",
         "clickhouse",
-        "datafusion",
         "impala",
         "oracle",
         "postgres",