-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Don't silently produce null values from invalid input to pl.datetime
and pl.date
#21013
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #21013 +/- ##
==========================================
+ Coverage 79.21% 79.27% +0.06%
==========================================
Files 1583 1583
Lines 225545 225584 +39
Branches 2586 2586
==========================================
+ Hits 178664 178842 +178
+ Misses 46291 46152 -139
Partials 590 590 ☔ View full report in Codecov by Sentry. |
pl.datetime
and pl.date
pl.datetime
and pl.date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really should return an error here, not a panic.
@ritchie46 I wasn't quite sure how to go about this, so let me know if it needs rework. Right now, we have an iterator that yields Instead, I opted to flag if an invalid value is observed during the array creation, and proceed as we used to (filling with nulls). Then I check in hindsight if an invalid value was observed, and at that point throw a |
Fixes #20977.
I am not sure if this is a breaking change or not.
Example of new behavior: