feat(scalars): add eql_v3.timestamptz encrypted-domain type (equality-only)#257
Open
tobyhede wants to merge 1 commit into
Open
feat(scalars): add eql_v3.timestamptz encrypted-domain type (equality-only)#257tobyhede wants to merge 1 commit into
tobyhede wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
37dc457 to
cea046f
Compare
3fa7497 to
b8b8726
Compare
cea046f to
ef32e5d
Compare
b8b8726 to
fd0bffc
Compare
7f489e8 to
55c19b8
Compare
4a595ea to
d21954f
Compare
…-only) Add the timestamptz scalar encrypted-domain type to the eql_v3 family as EQUALITY-ONLY: storage + eql_v3.timestamptz_eq (= / <> via HMAC), no ord domains, no MIN/MAX aggregates. Ordering is deferred: cipherstash encrypts Plaintext::Timestamp at native 12-block ORE width, but EQL's only ORE comparator (eql_v2.compare_ore_block_u64_8_256_term) is hardcoded to 8 blocks, so an ordered timestamptz domain would silently mis-order. Ordering follows once a wide-ORE (12-block) term lands. - catalog: add EQ_ONLY_DOMAINS (storage + _eq); point TIMESTAMPTZ at it. Replace all_types_share_the_same_domain_shape with a shape-aware test (every type matches one of two known shapes) plus a pin of which token uses which shape. - dispatch: extend the scalar_types! entry grammar with an optional [eq_only] marker; eq-only entries emit eq_only_scalar_matrix! instead of ordered_numeric_matrix!. ordered int4/int2/date emission is byte-identical. - matrix: eq_only_scalar_matrix! now derives its three pivots from the ScalarType impl (like the ordered macro) instead of requiring explicit pivots — the first consumer wires cleanly with no per-call pivot authoring. - inventory: make mise test:matrix:inventory shape-aware. Add the second canonical snapshot matrix_tests_eq_only.txt; each discovered type is compared against the snapshot matching its shape (ordered vs eq-only). Document the two-shape mechanism in snapshots/README.md. matrix_tests.txt is unchanged. - CHANGELOG: timestamptz ships equality-only, ordering deferred.
d21954f to
16ad2bb
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.
What
Add
eql_v3.timestamptzas an equality-only encrypted-domain scalar (storage +_eqvia HMAC;=/<>). Ordering is deferred: cipherstash encryptsPlaintext::Timestampat 12-block ORE width but EQL's only ORE comparator is 8-block, so an ordered domain would silently mis-order.Rides the generalized harness (#261)
Rebased onto
v3-scalar-harness-reduction, the per-type surface is +259 / 5 files (was +671 / 10). The whole type is:eql-scalars):ScalarKind::Timestamptz,Fixture::Timestamptz,EQ_ONLY_DOMAINS, theTIMESTAMPTZspec +CATALOGappend.temporal_values!call (scalar_domains.rs):scalar_types.rs):timestamptz => chrono::DateTime<chrono::Utc>,eql_plaintext.rs) + CHANGELOG.No marker, no second snapshot, no macro change — the catalog's eq-only domain shape drives everything: the emitter picks
scalar_matrix! { caps = [eq] }, and the inventory derives its eq-only name subset from the single baseline.Status / verification
cargo test -p eql-scalars→ 43 passed (incl.timestamptz_*)timestamptz: eq_only(derived, no second snapshot)release/*.sqlidentical to the pre-rebase commit — verification in progressv3-scalar-harness-reduction+ force-push (--force-with-lease) — pending (depends on refactor(scalars): generalize the test harness (catalog-driven shape, temporal_values!, unified scalar_matrix!) #261)