feat(v3/sem): pin ORE comparators IMMUTABLE + regression test#263
Open
tobyhede wants to merge 1 commit into
Open
feat(v3/sem): pin ORE comparators IMMUTABLE + regression test#263tobyhede wants to merge 1 commit into
tobyhede wants to merge 1 commit into
Conversation
The three compare_ore_block_u64_8_256_term(s) overloads (term×term, term[]×term[], composite×composite) are now IMMUTABLE, diverging from the v2 originals which default to VOLATILE. The comparison is deterministic — its only crypto call, pgcrypto encrypt(), is IMMUTABLE — so the planner can fold/cache in ordering and index contexts. NOT STRICT: the NULL-handling branches are load-bearing. T8 (family::sem::ore_comparators_are_immutable) asserts exactly 3 overloads exist and all have provolatile = 'i', so a silent regression to VOLATILE fails CI.
|
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 |
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
Mark the three
eql_v3.compare_ore_block_u64_8_256_term(s)overloadsIMMUTABLE(term×term, term[]×term[], composite×composite). They previously had no volatility marker and defaulted toVOLATILE.Why
The comparison is deterministic — its only crypto call, pgcrypto
encrypt(), is itselfIMMUTABLE STRICT PARALLEL SAFE— so marking the comparatorsIMMUTABLElets the planner fold/cache them in ordering and index contexts.CREATE FUNCTION eql_v3.compare_ore_block_u64_8_256_term(a …, b …) RETURNS integer + IMMUTABLE SET search_path = pg_catalog, extensions, publicNOT
STRICT: the NULL-handling branches in the array overload are load-bearing — aSTRICTmarker would let PostgreSQL skip the body on a NULL argument.Test
family::sem::ore_comparators_are_immutable(T8) asserts exactly 3 overloads exist and all carryprovolatile = 'i', so a silent regression toVOLATILEfails CI.Summary by CodeRabbit
Release Notes
Improvements
Tests