Repository navigation
feat: add identity-bound materialized views with transactional refresh - #27615
Open
jiangxinmeng1 wants to merge 216 commits into
Open
jiangxinmeng1 wants to merge 216 commits into
jiangxinmeng1 wants to merge 216 commits into
Conversation
…iew-24553 # Conflicts: # pkg/defines/const.go # pkg/sql/compile/ddl.go # pkg/sql/parsers/dialect/mysql/mysql_sql.go # pkg/sql/parsers/dialect/mysql/mysql_sql.y # pkg/sql/parsers/dialect/mysql/mysql_sql_test.go # pkg/sql/plan/bind_delete.go # pkg/sql/plan/bind_update.go # pkg/sql/plan/build_update.go
jiangxinmeng1
requested review from
XuPeng-SH,
aptend,
aunjgr,
gouhongshen and
iamlinjunhong
as code owners
August 26, 2026 02:25
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Resolve CI and merge conflicts; reserve MORPCVersion128 for materialized views.
Resolve CI and merge conflicts; reserve MORPCVersion128 for materialized views.
…i-20261021 # Conflicts: # pkg/defines/const.go
This branch had an error being 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.
What type of PR is this?
Which issue(s) this PR fixes:
issue #24553
What this PR does / why we need it:
Materialized views now bind refresh work to the exact catalog generation and publish result, auxiliary state and tail watermark in one transaction. Source replacement and stale prepared reads fail explicitly; unrestricted DELETE preserves referenced source identity and releases dead groups/state.
Fixes #24553.
Implemented SQL: FAST/FORCE/COMPLETE ON CHANGE; COMPLETE ON DEMAND with caller-transaction REFRESH; DROP MATERIALIZED VIEW. Incremental maintenance covers grouped COUNT/SUM/AVG/MIN/MAX, exact DISTINCT aggregates, HAVING and compatible UNION ALL. COMPLETE supports up to 16 direct base sources including joins. Unsupported hidden subqueries/CTEs/session-dependent or volatile expressions are rejected before persistence. This is the concrete D2 scope; the earlier operator-graph roadmap is not part of this implementation.
Repairs and cleanup:
Maintenance in this revision:
9f7fe43649. Preserve upstream protocol allocations; reserve protocol 132 for MV definitions/jobs and multi-source ISCP, and explicitly reject predecessors below 132 at MV admission. Regenerate the merged plan protobuf while retaining the new CTAS execution-protocol field.Validation on the current revision (Linux amd64, Go 1.27.1):
go vetand configuredmolintpassed for all 16 changed owning packages; molint's informational recover diagnostics match the incoming PR CI, with none introduced by this maintenance delta. Configured golangci-lint 2.14.0 scanned the full package graph with--new-from-rev 27131f3838: 0 issues. The original ARM64 SCA failure was S1011; local amd64 validation does not claim the new ARM64 CI result.Earlier feature validation included transactional rollback, restart/tail recovery and paired workload/freshness measurements. Those remain historical evidence; this maintenance revision does not claim a new restart, proxy/multi-CN, throughput or freshness benchmark.
Compatibility: requires protocol 129 throughout MV-serving services. Protocols below 129 are predecessors without the MV consumer and are rejected by MV admission; they must not create, claim, refresh, or recover MV jobs. Earlier unreleased MV envelopes require recreation; drop MVs before binary rollback. Mixed-version MV availability and whole-cluster downgrade are not claimed.
Design: English, 中文.