Skip to content

[Subtask]: D12 [amplified-on-main] Represent catalog identity and scope explicitly instead of deriving semantics from DDL text #32290

Open

Description

@XuPeng-SH

Parent Issue

Parent issue: #32278

Detail of Subtask

Catalog ID: D12
Origin: C - Baseline design debt expanded or amplified on main
Evidence level: Fragile ownership representation and propagation confirmed in source

4.2 versus main: provenance

The baseline already uses case-sensitive SQL-prefix classification for sys-only versus tenant initialization. Main extracts isSysOnlyCatalogRelationSQL and reuses it in new publication-availability inference that reparses creation SQL. The baseline weakness spreads to a new consumer.

Design problem, impact, and existing responsibility

DDL formatting/case can change account initialization and publication behavior even though it should not change relation scope. A main comment explicitly requires the uppercase mo_index_update prefix. Creation, deletion, restore, and upgrade also maintain identity information separately. No currently supported literal has been demonstrated to be misclassified.

Acceptance criteria

  • Changing DDL case, whitespace, or IF NOT EXISTS formatting does not change relation scope or publication availability.
  • Creation/deletion/account restore/upgrade/publication agree on identity while preserving sys/tenant, table/view, and special-initialization boundaries.
  • Remove superseded string classification, unnecessary parsing, and duplicate lists without growing a generic framework or adding per-SQL probes.

Describe implementation you've considered

Find the existing catalog declaration/registry owner first and reuse minimal explicit identity/scope information there. Do not create a parallel full registry. Preserve lifecycle-specific execution ordering and keep published migrations frozen rather than following mutable current definitions.

Additional information

Existing investigation and validation limits

Baseline authenticate.go:10365 contains the isSysOnlyDb lambda. Main authenticate.go:11395 and publication_view_scope.go:589 form a classification -> parsing -> availability chain. This demonstrates formatting-sensitive design, not a reproduced current data error.

main investigation snapshot: pkg/frontend/authenticate.go:11395; pkg/frontend/publication_view_scope.go:589

4.2 baseline snapshot: pkg/frontend/authenticate.go:10365

The named probes are local diagnostic overlays, not committed repository tests. Their names identify the investigation; they cannot be selected directly from an ordinary checkout. Implement the smallest maintained contract regressions and reuse relevant CI/validation proportionally. Temporary evidence commits are not required.

Activity

  1. self-assigned this
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. changed the title [-][Subtask]: D12 [base→main放大] 显式表达 catalog 身份与作用域,停止从 DDL 文本推断产品语义[/-] [+][Subtask]: D12 [amplified-on-main] Represent catalog identity and scope explicitly instead of deriving semantics from DDL text[/+] on Nov 5, 2026
  4. MatrixAdventurer commented on Nov 6, 2026

    @MatrixAdventurer
    Contributor

    分级建议:severity/s-1——以 DDL 文本反推目录身份/范围的实现债,无故障或数据错误记录。
    所属模块:catalog 身份判定(isSysOnlyCatalogRelationSQL 之复用)。
    疑似重复:未发现直接重复;相关 #29864(closed)、#31542(open)。
    建议负责人:XuPeng-SH(父单 #32278 发起人、本子任务 assignee)。
    本操作由LW授权的MOI智能体提交

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions