Skip to content

Conversation

@weinan003
Copy link
Contributor

After subquery dedup(ref. a031a4a), The cte consumer need to decrement, so that XformInlineCTE can help us rid of unnecessary Shared Scan node.

TODO:

  1. Instead of mock CTE MDID, we should parser CTE related relation MDID, and dedup CTE with other flat subquery together.
  2. inner join subquery, join order should not involve into dedup comparation
  3. For subquery, not only AndOp but also OrOp can dedup

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


After subquery dedup(ref. a031a4a),
The cte consumer need to decrement, so that XformInlineCTE can help
us rid of unnecessary Shared Scan node.

TODO:
1. Instead of mock CTE MDID, we should parser CTE related relation MDID,
and dedup CTE with other flat subquery together.
2. inner join subquery, join order should not involve into dedup comparation
3. For subquery, not only AndOp but also OrOp can dedup
@my-ship-it my-ship-it self-requested a review December 1, 2025 08:05
void
Decrement()
{
GPOS_ASSERT(m_ulCount > 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why GPOS_ASSERT(m_ulCount > 1);?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants