Open
Conversation
joshua-spacetime
requested changes
Mar 31, 2026
Collaborator
joshua-spacetime
left a comment
There was a problem hiding this comment.
I think more testing is needed for this patch.
0367d60 to
58644fe
Compare
58644fe to
e649f64
Compare
| UniqueBTreeBytesKey32(_) => bounds_from_bsatn_bytes_key!(TypedIndexKey::BytesKey32), | ||
| UniqueBTreeBytesKey64(_) => bounds_from_bsatn_bytes_key!(TypedIndexKey::BytesKey64), | ||
| UniqueBTreeBytesKey128(_) => bounds_from_bsatn_bytes_key!(TypedIndexKey::BytesKey128), | ||
| BTreeAV(_) | HashAV(_) | UniqueBTreeAV(_) | UniqueHashAV(_) => { |
Collaborator
There was a problem hiding this comment.
bounds_from_bsatn now handles the UniqueBTreeBytesKey* variants in the multi-column Product branch, but it doesn't handle *HashBytesKey* variants. The new tests only cover btree indexes. Fixed size multi-column hash indexes remain untested.
Contributor
Author
There was a problem hiding this comment.
I've substantially hardened the tests now, please have another look.
047db8f to
1db5d12
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.
Description of Changes
Add support for btree indices where the keys are encoded byte strings for e.g., multi-column indices of no-unbounded-types (arrays and strings) that aren't floats.
The main interesting stuff in this PR is in
bytes_key.rswhich definesRangeCompatBytesKey, a type that is derived fromBytesKey, by converting little-endian encoded integers to big-endian. Signed integers are now also supported, but floats are not.table_index/mod.rsalso includes a bunch of interesting stuff.API and ABI breaking changes
Technically this fixes pre-existing bugs in the handling of
Excludedranges for multi-col indices.Expected complexity level and risk
2?
Testing
order_in_bsatn_is_preservedis now adjusted and enabled to exercise the ordering ofRangeCompatBytesKey.btree_multi_col_range_scans_workis added to check the behavior of range scans on multi-col indices.