Claim a restriction by the overloads it declares, not by its name - #363
Merged
estebanzimanyi merged 1 commit intoSep 3, 2026
Merged
Conversation
Which functions the two-operand restriction shape claims is read from the catalog: a function whose sqlSignatures declare a two-argument overload is claimed, one that declares none is not. The emitted surface does not move — 6264 registrations before and after, none added, none removed — so what changes is where the answer comes from, not what it is. The name decided it before, through a `tstz` substring for the time restrictions and a span spelling for the value ones. A name cannot see which overloads an extension declares, so a second shape existed for the restrictions the first turned away, each guarded against the other so no function was claimed twice. Both now answer from the same statement, and the second reaches nothing: over the catalog it claims thirty functions, and all thirty are claimed by the first. It is removed with its emitter and the three tables left unused, and the generated files do not move, which is what says they were unreachable rather than merely unused. A box is admissible here only where the function answers a temporal value, which is a restriction. shape_temporal_box owns the pairings of a temporal value with a box that answer a scalar, and claiming those here as well emits their body twice — a redefinition the compiler rejects. A registration set cannot see it: two identical registrations collapse in a set where two definitions do not, so the check that a surface is unchanged has to count bodies as well.
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.
Which functions the two-operand restriction shape claims is read from the
catalog: a function whose sqlSignatures declare a two-argument overload is
claimed, one that declares none is not. The emitted surface does not move —
6264 registrations before and after, none added, none removed — so what
changes is where the answer comes from, not what it is.
The name decided it before, through a
tstzsubstring for the timerestrictions and a span spelling for the value ones. A name cannot see which
overloads an extension declares, so a second shape existed for the
restrictions the first turned away, each guarded against the other so no
function was claimed twice. Both now answer from the same statement, and the
second reaches nothing: over the catalog it claims thirty functions, and all
thirty are claimed by the first. It is removed with its emitter and the three
tables left unused, and the generated files do not move, which is what says
they were unreachable rather than merely unused.
A box is admissible here only where the function answers a temporal value,
which is a restriction. shape_temporal_box owns the pairings of a temporal
value with a box that answer a scalar, and claiming those here as well emits
their body twice — a redefinition the compiler rejects. A registration set
cannot see it: two identical registrations collapse in a set where two
definitions do not, so the check that a surface is unchanged has to count
bodies as well.