-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 sorting on missing non-string fields #5570
Conversation
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.
Thanks for this, I tested it and it works fine! Added a couple of comments
Looks great. I see that |
I'm guessing you meant typing dependencies and added it there instead, but let me know if I misunderstood. There are a bunch of typecheck errors now but none of them are in the changed files. Is something wrong or is this expected? |
You're completely correct! Thanks
That's expected - |
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.
Good stuff, thanks for this!
Description
Fixes #5512. When sorting on a field, if the field is missing from some items and it has a type, use the type's
null
value. Otherwise, continue to fall back to an empty string, as I don't think there's much to be done in that case.The new test
test_int_field_present_in_some_items
fails without the fix inquery.py
.