Skip to content

Robj/iterator init options pr - #694

Merged
rtjohnso merged 10 commits into
mainfrom
robj/iterator-init-options-pr
Oct 26, 2026
Merged

rtjohnso merged 10 commits into
mainfrom
robj/iterator-init-options-pr

Conversation

@rtjohnso

Copy link
Copy Markdown
Collaborator

Make it easier to initialize iterators and lookup_result structures.

rtjohnso and others added 6 commits October 25, 2026 11:53
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lpers

Start position becomes an optional parameter; zero value is a full forward scan.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…b_optimize

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…it and core_range_iterator_init

Adds key_lower_limit/key_upper_limit/key_start_position (internal-key analogues
of the public types). Merges core_range_iterator_init_with_filter into
core_range_iterator_init. Drops redundant range params from
core_memtable_iterator_init.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d btree_pack_req_init

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for splinterdb canceled.

Name Link
🔨 Latest commit 0f3d812
🔍 Latest deploy log https://app.netlify.com/projects/splinterdb/deploys/6adec3228a7f63f1c3142aeb

rtjohnso and others added 4 commits October 25, 2026 12:22
…g-braces)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Rob Johnson <rob@robjohnson.io>
A zero-initialized key has kind 0, which is not NULL_KEY, so every iterator
created without a filter was rejected with STATUS_BAD_PARAM.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Renumber key_type to NEGATIVE_INFINITY = -1, USER_KEY = 0,
POSITIVE_INFINITY = 1, so a zero-initialized key is exactly NULL_KEY and
there is one representation of "no key". The order is preserved for
data_key_compare's kind subtraction; static asserts guard both properties.
key_type values are never persisted.

With that, limits no longer need a "present" flag: a null key means
unbounded and the comparison is ignored. Start positions become a
direction plus an exclusive flag instead of a comparison, so their zero
value is the default forward, inclusive scan. Public limits are validated
only when they have a key. Removes the kind == 0 workaround in
core_range_iterator_init.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rtjohnso
rtjohnso merged commit acd6114 into main Oct 26, 2026
113 of 114 checks passed
@rtjohnso
rtjohnso deleted the robj/iterator-init-options-pr branch October 26, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant