Skip to content

fix: support string, date, and datetime bounds in polars fill_gaps - #302

Open
Jakub Krasuski (Blizzeq) wants to merge 1 commit into
Nixtla:mainfrom
Blizzeq:fix/fill-gaps-polars-bound
Open

Jakub Krasuski (Blizzeq) wants to merge 1 commit into
Nixtla:mainfrom
Blizzeq:fix/fill-gaps-polars-bound

Conversation

@Blizzeq

Copy link
Copy Markdown
Contributor

When calling fill_gaps on a Polars DataFrame with a custom start or end timestamp (such as a string like '2020-01-01', a date, or a datetime), _determine_bound_pl created a Series([val]) without matching the target dtype of the time column. This caused a panic in datetime_ranges when passed string series, or a schema error when joining differing datetime and date keys.

This PR ensures _determine_bound_pl converts scalar bounds (strings, dates, datetimes) to match the time column's target dtype in Polars before building the grid. Added regression tests covering string, date, and datetime bounds on Polars.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant