Expand description
Decode the structured row-pattern proto into the executor-side Pattern. The frontend lowers
the SQL PATTERN clause directly into this proto tree, so there is no textual round-trip.
Constants§
- MAX_
PATTERN_ 🔒NFA_ STATES - Decode-side re-statement of the binder’s
MAX_PATTERN_NFA_STATES. - MAX_
PERMUTE_ 🔒VARS - Decode-side re-statement of the binder’s
MAX_PERMUTE_VARS:PERMUTEexpands ton!orderings, so a skewed or corrupt plan carrying an oversized one would allocate factorially before any row is processed. Every other malformed input to this decoder fails with a descriptive error; the sizes must too. - MAX_
QUANTIFIER_ 🔒BOUND - Decode-side re-statement of the binder’s
MAX_QUANTIFIER_BOUND: a range bound is a state multiplier for the compiled NFA (a{4_000_000_000}would try to build billions of states).
Functions§
- decode_
pattern 🔒 - estimate_
nfa_ 🔒states - Estimated compiled-NFA state count, mirroring the binder’s
estimate_nfa_statesover the decoded pattern. Saturating throughout: the point is to reject the absurd, and a saturated total is still over the cap.PERMUTEis counted in its expanded form (n!orderings), the same shape the binder assumes. - pattern_
from_ protobuf - Build a
Patternfrom its protobuf representation, rejecting one whose compiled size would be absurd. The size check is on the whole decoded pattern, since nesting is what defeats the per-construct caps. - patterns_
from_ 🔒protobuf - quantifier_
from_ 🔒protobuf