-
Notifications
You must be signed in to change notification settings - Fork 649
fix(common): order null as largest by default to align with PostgreSQL #4263
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
Conversation
``` NEXTEST_EXPERIMENTAL_FILTER_EXPR=1 ./risedev test -E 'not test(~lookup_join)' ```
Codecov Report
@@ Coverage Diff @@
## main #4263 +/- ##
==========================================
- Coverage 74.38% 74.37% -0.01%
==========================================
Files 842 842
Lines 121509 121511 +2
==========================================
- Hits 90381 90379 -2
- Misses 31128 31132 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
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.
LGTM!
Rust’s Option is null-first by default. I guess some BTreeMap cache storing OptionT is still having a wrong behavior. We should take some time to revisit them. |
risingwavelabs#4263) * encode and decode null as largest in memcomparable encoding * fix unit test except lookup join ``` NEXTEST_EXPERIMENTAL_FILTER_EXPR=1 ./risedev test -E 'not test(~lookup_join)' ``` * update lookup join unit test * update e2e * update batch ordering of null * update e2e Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
Without
nulls first
ornulls last
, which we do not support yet, PostgreSQL treatsnull
as largest value, while we have been treating it as the smallest.null_tag
is flipped. That is,null
encodes and decodes as1
rather than0
.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Types of user-facing changes
Release note
When ordering on a column containing null values, our behavior is now same as PostgreSQL. That is,
null
is treated as larger than any other value.Refer to a related PR or issue link (optional)
Fixes #3204