-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Labels
bug: incorrect resultSomething isn't workingSomething isn't workingduckdbIssue is related to duckdb backendIssue is related to duckdb backend
Description
in duckdb, adding an interval of 1 day is different to using date_add with '1 day':
print(duckdb.sql("""
SET timezone = 'Europe/Amsterdam';
select a,
date_add('24 hours', a) as b,
a + '1 day'::INTERVAL as c
from values (CAST('2025-10-26' AS TIMESTAMPTZ),) df(a)
"""))┌──────────────────────────┬──────────────────────────┬──────────────────────────┐
│ a │ b │ c │
│ timestamp with time zone │ timestamp with time zone │ timestamp with time zone │
├──────────────────────────┼──────────────────────────┼──────────────────────────┤
│ 2025-10-26 00:00:00+02 │ 2025-10-26 23:00:00+01 │ 2025-10-27 00:00:00+01 │
└──────────────────────────┴──────────────────────────┴──────────────────────────┘
In Narwhals, we're using date_add:
we should probably be summing an interval instead?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug: incorrect resultSomething isn't workingSomething isn't workingduckdbIssue is related to duckdb backendIssue is related to duckdb backend