You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to pick this up. Two quick questions before I start:
For DuckDB and Spark-like, the offset strings have to be parsed per row in SQL (regex for <multiple><unit>, then a CASE on the unit). An invalid string, or ns on DuckDB, would give null there, while Polars raises. Is null acceptable for those backends, or would you rather they raise up front?
Should pandas-like, PyArrow, Dask and Ibis raise NotImplementedError for an expression by (keeping the existing str path unchanged), as the issue suggests?
An invalid string, or ns on DuckDB, would give null there, while Polars raises. Is null acceptable for those backends, or would you rather they raise up front?
if that's the only thing they can do, then sure, I guess we'll just have to document the difference
Should pandas-like, PyArrow, Dask and Ibis raise NotImplementedError for an expression by (keeping the existing str path unchanged), as the issue suggests?
Yup! Until (if they ever do) offer an expressified way to do it
Activity
dangotbanned commentedon Jul 7, 2025
I think
pyarrowwould also work, provided we can convert thebcolumn to:https://github.com/zen-xu/pyarrow-stubs/blob/d4fbd25850207531ff26902d8d4bc134ee5ccd79/pyarrow-stubs/__lib_pxi/table.pyi#L1496-L1500
We seem to just be using
pc.add, which supports those operandshttps://github.com/zen-xu/pyarrow-stubs/blob/d4fbd25850207531ff26902d8d4bc134ee5ccd79/pyarrow-stubs/compute.pyi#L1077-L1084
29antonioac commentedon Aug 15, 2025
In Pandas it could work, but only if the offset is a timedelta 😅.
Would be great to see it in Narwhals!
MarcoGorelli commentedon Aug 15, 2025
yup, PRs welcome!
555aaditya commentedon Oct 28, 2026
I'd like to pick this up. Two quick questions before I start:
<multiple><unit>, then aCASEon the unit). An invalid string, ornson DuckDB, would give null there, while Polars raises. Is null acceptable for those backends, or would you rather they raise up front?NotImplementedErrorfor an expressionby(keeping the existingstrpath unchanged), as the issue suggests?MarcoGorelli commentedon Oct 28, 2026
thanks for looking into this!
if that's the only thing they can do, then sure, I guess we'll just have to document the difference
Yup! Until (if they ever do) offer an expressified way to do it