You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 54627ed
Browse filesBrowse the repository at this point in the historyBrowse files
catalog: inline bind_result on TableInfo for @bind_fixed_schema functions
Add a `bind_result: bytes | None` field at the tail of TableInfo. When
populated, the C++ extension uses these bytes verbatim and skips the
per-scan `bind` RPC for catalog-routed scans.
Pre-binding lives in the catalog framework's schema_contents post-pass
(not in Table.to_table_info, which lacks the live request context). The
post-pass is restricted to functions decorated with @bind_fixed_schema:
the decorator's contract — output is exactly cls.FIXED_SCHEMA, no
kwargs, no per-call state — matches what's safe to freeze for the
catalog cache lifetime.
The decorator now sets two markers:
- cls._inline_bind_safe = True (class level, only when injection
actually happened — i.e., the existing "on_bind not in __dict__"
guard succeeded)
- on_bind_impl._is_bind_fixed_schema = True (function level, lets us
distinguish decorator-installed on_bind from a subclass override)
Table.inline_bind=True is the descriptor opt-in. The validator rejects
descriptors whose function isn't @bind_fixed_schema-decorated, or whose
function class overrides on_bind (escaping the decorator's contract).
The schema_contents post-pass synthesizes
BindResponse(output_schema=cls.FIXED_SCHEMA) directly — no func_cls.bind()
call. This sidesteps the entire class of "bind succeeded with garbage
inputs because the catalog request didn't carry real settings/secrets"
failures because the decorator's bind has no inputs. The serialized blob
is cached lazily on a private class attribute (FIXED_SCHEMA never
changes) so repeated schema_contents calls reuse it.
Tests cover round-trip, schema-shape positional invariant, descriptor
validation paths, and end-to-end populate-on-schema_contents.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments