-
-
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(rust): Return empty DF when input is empty json list #18663
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18663 +/- ##
==========================================
+ Coverage 79.90% 79.93% +0.02%
==========================================
Files 1512 1512
Lines 203203 203225 +22
Branches 2891 2891
==========================================
+ Hits 162379 162445 +66
+ Misses 40274 40230 -44
Partials 550 550 ☔ View full report in Codecov by Sentry. |
values, | ||
self.infer_schema_len | ||
.unwrap_or(NonZeroUsize::new(usize::MAX).unwrap()), | ||
)? | ||
.to_arrow(CompatLevel::newest()) | ||
); |
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.
nit: .map(|supertype| supertype.to_arrow(CompatLevel::newest()))
}; | ||
if inner_dtype_result.is_err() { | ||
match &json_value { |
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.
Instead of changing the whole dtype
inference and control flow. Could we start this function with this check, and just early return DataFrame::empty
?
Co-authored-by: coastalwhite <me@gburghoorn.com>
…o columns selected (pola-rs#18772)
…nc executor in new-streaming (pola-rs#18764)
…lars into fix_empty_json_list
fixes #7355