Repository navigation
Commit 86ba5e0
authored
docs(physical-optimizer): warn that wrapper rules must forward schema_check (#25357)
## Which issue does this PR close?
Closes #25316.
## Rationale for this change
`OptimizationInvariantChecker` consults `schema_check()` on the rule the
optimizer holds. For a rule that runs *other* rules inside its own
`optimize()` — an instrumentation wrapper, a conditional wrapper, a rule
that fuses a short sequence — the optimizer never sees the inner rules,
only the wrapper.
Returning `false` from such a wrapper therefore disables schema
validation for everything it wraps, including rules that explicitly
opted in. Nothing warns at registration or at run time; validation
simply stops happening, and the loss only surfaces if a schema-changing
regression happens to hit that path. I walked into this myself: `false`
looked correct because each wrapped rule had its own `schema_check()`,
but those values are never consulted once the rules are inside a
wrapper.
## What changes are included in this PR?
A doc comment on `schema_check()` stating the requirement, with the
one-line `any()` form, so an implementor reads it where they make the
decision.
## Are these changes tested?
Documentation only, no behavior change.
## Are there any user-facing changes?
Doc only.1 parent 5a44905 commit 86ba5e0
1 file changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
83 | 112 | | |
84 | 113 | | |
0 commit comments