fix(python): Improve schema inference for null-first rows#22923
Draft
5vb76 wants to merge 3 commits intopola-rs:mainfrom
Draft
fix(python): Improve schema inference for null-first rows#229235vb76 wants to merge 3 commits intopola-rs:mainfrom
5vb76 wants to merge 3 commits intopola-rs:mainfrom
Conversation
Author
|
Hi, reviewers. |
ddf5907 to
d0914d4
Compare
90ceb7b to
e9fce55
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21537
Updated the test suite so that running make test now produces the expected output.
Enhance schema‐inference robustness: When infer_schema_length=1 and the first row contains only NULL values, Polars will now scan subsequent rows to determine each column’s actual type—preventing premature failures and improving the user experience.
Test updates: Modified test_infer_schema_length to validate this new, more resilient behavior.