Fix writable CTE on replicated tables EXCEPT partition tables.#1290
Merged
avamingli merged 1 commit intoapache:mainfrom Sep 9, 2025
Merged
Fix writable CTE on replicated tables EXCEPT partition tables.#1290avamingli merged 1 commit intoapache:mainfrom
avamingli merged 1 commit intoapache:mainfrom
Conversation
Fix issue: apache#1240 Replicated locus could EXCEPT Partitioned locus when there is writable CTE on replicated tables. We could make them SingleQE or Entry to do the set operation. with result as (update r_1240 set a = a +1 where a < 5 returning *) select * from result except select * from p1_1240; QUERY PLAN --------------------------------------------------------------- HashSetOp Except -> Append -> Explicit Gather Motion 3:1 (slice1; segments: 3) -> Subquery Scan on "*SELECT* 1" -> Update on r_1240 -> Seq Scan on r_1240 Filter: (a < 5) -> Gather Motion 3:1 (slice2; segments: 3) -> Subquery Scan on "*SELECT* 2" -> Seq Scan on p1_1240 Optimizer: Postgres-based planner (11 rows) Authored-by: Zhang Mingli avamingli@gmail.com
109719b to
826582c
Compare
zhangwenchao-123
approved these changes
Sep 9, 2025
yjhjstz
approved these changes
Sep 9, 2025
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.
Fix issue: #1240
Replicated locus could EXCEPT Partitioned locus when there is writable CTE on replicated tables.
We could make them SingleQE or Entry to do the set operation.
Authored-by: Zhang Mingli avamingli@gmail.com
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions