Repository navigation
DDIR: bump corgi to one Int; Float as its own scalar - #926
Merged
Merged
Conversation
Corgi now has one integer type, `Int`, exact within i64, and DDIR's `Int` is it. The sign-bit swizzles (`ToSigned`, `signed_order_view`) are gone, and division and ordered compares are corgi's own. Corgi orders integers by signed value, so arrangement identifiers are `i64` throughout join, reduce, and search. The join walk starts at `i64::MIN`, not 0, so negative keys are not skipped. Corgi chooses how to hold an integer column, and a mask or tag may be held as bytes. `present_key` widens such a key to `i64`, so it is its own identifier rather than hashed, and arranged values are widened the same way so that every chunk's lanes can be borrowed. `&&` and `or` read each operand as 0/1 (nonzero is true) before `min`/`max`. `hash` shifts with `shr_b64`, and a bound that is not positive reduces to the identity. F64 ops reach corgi's `Float` through host kernels on the newtype payload, until DDIR has a Float of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`Value::Float` replaces the one-variant F64 newtype over an encoded `Int`. It compares, orders, and hashes by the total order, as corgi's `Float` does, and transcodes to a corgi `Float` column. The float ops apply to `Float` columns directly, and the payload kernels are gone. `float` is a declarable type. The SNB harness reads `Float(x)` from server output in place of the newtype's payload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`u64` and `int` named the same signed integer, and `u64` misdescribed it. The shape syntax now names `int` and `float`, and `u64` is an error pointing at `int`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`0..k as u8` is `0..(k as u8)`, which is empty at k = 256. The tags are now `(0..k).map(|t| t as u8)`, and a test covers 1, 255, and 256 elements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Corgi #75 lets `Weave` read its tags at any integer storage, so list literals tag their elements with `Iota` again, in place of a byte literal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Corgi's #74 replaced leaf widths and integer kinds with two leaf types,
Int(exact within i64) andFloat(f64).This PR moves DDIR's corgi pin past it, and then gives DDIR a
Floatof its own.Bump to one Int
DDIR's
Intis corgi'sInt, so the sign-bit swizzles (ToSigned,signed_order_view) are gone and division and ordered compares are corgi's own.Corgi orders integers by signed value, so arrangement identifiers are
i64throughout join, reduce, and search.The join walk now starts at
i64::MIN; starting at 0 would skip negative keys (negative_keys_join).Corgi chooses how to hold an integer column, and a mask or sum tag may be held as bytes.
present_keywidens such a key toi64, so it is its own identifier rather than hashed (byte_held_integer_keys_are_presented_as_i64).Arranged values are widened the same way, so every chunk's lanes can be borrowed.
&&andorread each operand as 0/1 (nonzero is true) beforemin/max, asir::evaldoes.hashshifts withshr_b64, and a bound that is not positive reduces to the identity.Ordered compares now lower on any two same-shape values, by corgi's structural order.
Float
Value::Floatreplaces the one-variant F64 newtype over an encodedInt.It compares, orders, and hashes by the total order, as corgi's
Floatdoes, and transcodes to a corgiFloatcolumn.floatis a declarable type.The SNB harness reads
Float(x)from server output in place of the newtype's payload.Notes
The pin is corgi
9737792, which adds #75 on top of #74:Weavereads its tags at any integer storage, so list literals tag elements withIota.The
u64type name is retired;intandfloatare the scalar types.Checks
cargo test --workspace; AoC 33/33 on both backends; the LDBC smoke, SNB catalogue (mixed at 1 and 4 workers, maintained at 4), and release explain suites.🤖 Generated with Claude Code