Repository navigation
draft: Implement type builtin relations - #40067
Draft
SangJunBak wants to merge 4 commits into
Draft
SangJunBak wants to merge 4 commits into
SangJunBak wants to merge 4 commits into
Conversation
Adds three generated constant views that report builtin objects: mz_internal.mz_builtin_types, mz_internal.mz_builtin_functions and mz_internal.mz_builtin_operators. They join the other mz_builtin_* views in mz_builtin_views and mz_builtin_columns. builtin_types_ctes and builtin_signature_ctes resolve builtin type names to catalog ids through GidMapping records in mz_catalog_raw. catalog-decode now decodes CREATE TYPE statements: the type kind and category, plus the element, key and value type ids and modifiers of list and map types, so the type relations can report user-defined types from mz_catalog_raw. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_raw Converts the builtin tables mz_types, mz_array_types, mz_base_types, mz_list_types, mz_map_types, mz_pseudo_types, mz_type_pg_metadata, mz_functions and mz_operators to materialized views over mz_catalog_raw, and mz_aggregates to a view over mz_builtin_functions. Builtin rows come from the generated mz_builtin_types, mz_builtin_functions and mz_builtin_operators views, user-defined types from their decoded CREATE TYPE statements. pg_aggregate declares the oid key it now derives through mz_aggregates. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The type, function and operator relations are derived from mz_catalog_raw, so pack_item_update no longer packs rows for types and functions, and catalog open no longer packs a row per operator. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tor relations Adds replacement migration steps for the converted relations, records their conversion version for the builtin version pin platform check, and updates the generated docs and the sqllogictest and testdrive expectations. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SangJunBak
force-pushed
the
jun/type-relations
branch
from
November 4, 2026 22:06
c2e9873 to
187e43c
Compare
This branch has not been deployed
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.
Closes sql-495
Motivation
Why does this change exist? Link to a GitHub issue, design doc, Slack
thread, or explain the problem in a sentence or two. A reviewer who has
no context should understand why after reading this section.
If this implements or addresses an existing issue, it's enough to link to that:
Closes
Fixes
etc.
Description
What does this PR actually do? Focus on the approach and any non-obvious
decisions. The diff shows the code --- use this space to explain what the
diff can't tell a reviewer.
Verification
How do you know this change is correct? Describe new or existing automated
tests, or manual steps you took.