Skip to content

Commit 504e103

Browse files
committed
feat(datafusion): implement Limit
1 parent e4d46f5 commit 504e103

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ibis/backends/datafusion/compiler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ def selection(op):
107107
return plan
108108

109109

110+
@translate.register(ops.Limit)
111+
def limit(op):
112+
if op.offset:
113+
raise NotImplementedError("DataFusion does not support offset")
114+
return translate(op.table).limit(op.n)
115+
116+
110117
@translate.register(ops.Aggregation)
111118
def aggregation(op):
112119
table = translate(op.table)

ibis/backends/tests/test_api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from pytest import param
33

44
import ibis
5-
import ibis.common.exceptions as exc
65

76

87
def test_backend_name(backend):
@@ -73,7 +72,6 @@ def test_tables_accessor_tab_completion(con):
7372
assert 'functional_alltypes' in keys
7473

7574

76-
@pytest.mark.notimpl(["datafusion"], raises=exc.OperationNotDefinedError)
7775
@pytest.mark.parametrize(
7876
"expr_fn",
7977
[

0 commit comments

Comments
 (0)