Skip to content

Commit 6924f50

Browse files
cpcloudkszucs
authored andcommitted
feat(duckdb): implement now() function
1 parent c93680e commit 6924f50

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ibis/backends/duckdb/registry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,6 @@ def _struct_field(t, expr):
123123
ops.TimestampDiff: fixed_arity('age', 2),
124124
ops.TimestampFromUNIX: _timestamp_from_unix,
125125
ops.Translate: fixed_arity('replace', 3),
126+
ops.TimestampNow: fixed_arity('now', 0),
126127
}
127128
)

ibis/backends/tests/test_temporal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def test_day_of_week_column_group_by(
580580
backend.assert_frame_equal(result, expected, check_dtype=False)
581581

582582

583-
@pytest.mark.notimpl(["datafusion", "duckdb"])
583+
@pytest.mark.notimpl(["datafusion"])
584584
def test_now(backend, con):
585585
expr = ibis.now()
586586
result = con.execute(expr)
@@ -593,8 +593,8 @@ def test_now(backend, con):
593593

594594

595595
@pytest.mark.notimpl(["dask"], reason="Limit #2553")
596-
@pytest.mark.notimpl(["datafusion", "duckdb"])
597-
def test_now_from_projection(backend, con, alltypes, df):
596+
@pytest.mark.notimpl(["datafusion"])
597+
def test_now_from_projection(backend, alltypes):
598598
n = 5
599599
expr = alltypes[[ibis.now().name('ts')]].limit(n)
600600
result = expr.execute()

0 commit comments

Comments
 (0)