Repository navigation
perf(sequence): answer ordering and inequality comparisons directly - #10144
Merged
Merged
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Contributor
|
This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days |
robert3005
force-pushed
the
rk/sequence-compare-ordering
branch
from
October 29, 2026 22:21
2fdb5dc to
440ca83
Compare
The compare kernel only handled equality, so every other comparison against a constant materialized the sequence. A sequence is monotonic, so an ordering comparison holds on a prefix or a suffix of rows; the kernel now solves for that boundary in i128 and fills the bit range. Inequality negates the equality answer. Tests compare every operator against the materialized values for ascending, descending, constant, single-row, narrow, and past-i64 sequences. Claude-Session: https://claude.ai/code/session_018upv3gY1moo3ba85gKLqbH Signed-off-by: Robert Kruszewski <github@robertk.io>
connortsui20
reviewed
Nov 2, 2026
Restore the comments that the previous commit deleted, and explain how ordered_run counts the rows before the constant, with an example. Move the integer widening into PValue::as_i128, so that other callers can use it. Signed-off-by: Robert Kruszewski <github@robertk.io>
robert3005
force-pushed
the
rk/sequence-compare-ordering
branch
from
November 2, 2026 16:01
440ca83 to
31f598b
Compare
Signed-off-by: Robert Kruszewski <github@robertk.io>
robert3005
enabled auto-merge (squash)
November 2, 2026 16:38
connortsui20
approved these changes
Nov 2, 2026
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.
The compare kernel only handled equality, so every other comparison against a constant materialized the sequence. A sequence is monotonic, so an ordering comparison holds on a prefix or a suffix of rows; the kernel now solves for that boundary in i128 and fills the bit range. Inequality negates the equality answer.