Skip to content

Conversation

@yjhjstz
Copy link
Member

@yjhjstz yjhjstz commented Jan 15, 2026

CWindowOids class was leaking three CMDIdGPDB objects (m_MDIdRowNumber, m_MDIdRank, m_MDDenseRank) that were allocated in the constructor but never released.

Fixes ORCA unit test failures:

  • gporca_test_CXformTest
  • gporca_test_CConstExprEvaluatorDefaultTest

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


CWindowOids class was leaking three CMDIdGPDB objects (m_MDIdRowNumber,
m_MDIdRank, m_MDDenseRank) that were allocated in the constructor but
never released.

Fixes ORCA unit test failures:
  - gporca_test_CXformTest
  - gporca_test_CConstExprEvaluatorDefaultTest
Copilot AI review requested due to automatic review settings January 15, 2026 19:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a memory leak in the CWindowOids class by adding a destructor that properly releases three CMDIdGPDB objects that were allocated in the constructor but never freed.

Changes:

  • Added destructor to CWindowOids class that releases the three owned IMDId pointers
  • Properly declared the destructor as override since CWindowOids inherits from CRefCount

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/backend/gporca/libgpopt/include/gpopt/base/CWindowOids.h Declares the destructor as virtual override
src/backend/gporca/libgpopt/src/base/CWindowOids.cpp Implements the destructor to release the three MDId member pointers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant