Skip to content

Commit

Permalink
fix(duckdb): keep ibis.now() type semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 17, 2022
1 parent bf9991a commit eca4a2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ibis/backends/duckdb/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ def _struct_column(t, op):
ops.TimestampDiff: fixed_arity(sa.func.age, 2),
ops.TimestampFromUNIX: _timestamp_from_unix,
ops.Translate: fixed_arity(sa.func.replace, 3),
ops.TimestampNow: fixed_arity(sa.func.now, 0),
ops.TimestampNow: fixed_arity(
# duckdb 0.6.0 changes now to be a tiemstamp with time zone force
# it back to the original for backwards compatibility
lambda *_: sa.cast(sa.func.now(), sa.TIMESTAMP),
0,
),
ops.RegexExtract: _regex_extract,
ops.RegexReplace: fixed_arity(sa.func.regexp_replace, 3),
ops.StringContains: fixed_arity(sa.func.contains, 2),
Expand Down

0 comments on commit eca4a2c

Please sign in to comment.