This is an automated email from the ASF dual-hosted git repository. maxyang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 316553cbe4f6c7be62675c25e0366e3771734dbc Author: Chris Hajas <[email protected]> AuthorDate: Thu Oct 26 17:02:46 2023 -0400 Fix CColRefSet DbgPrint (#16652) This re-allows debugging via `colrefset->DbgPrint()`. Previously trying to do this resulted in an error, as both CColRefSet and CBitSet inherited from DbgPrintMixin. --- src/backend/gporca/libgpopt/include/gpopt/base/CColRefSet.h | 4 ++-- src/backend/gporca/libgpopt/src/base/CColRefSet.cpp | 2 -- src/backend/gporca/libgpos/include/gpos/common/CBitSet.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/gporca/libgpopt/include/gpopt/base/CColRefSet.h b/src/backend/gporca/libgpopt/include/gpopt/base/CColRefSet.h index 007d6671cf..b4e34c62c8 100644 --- a/src/backend/gporca/libgpopt/include/gpopt/base/CColRefSet.h +++ b/src/backend/gporca/libgpopt/include/gpopt/base/CColRefSet.h @@ -48,7 +48,7 @@ using IntToColRefMap = // member functions inaccessible // //--------------------------------------------------------------------------- -class CColRefSet : public CBitSet, public DbgPrintMixin<CColRefSet> +class CColRefSet : public CBitSet { // bitset iter needs to access internals friend class CColRefSetIter; @@ -127,7 +127,7 @@ public: ULONG HashValue(); // debug print - IOstream &OsPrint(IOstream &os) const; + IOstream &OsPrint(IOstream &os) const override; IOstream &OsPrint(IOstream &os, ULONG ulLenMax) const; // extract all column ids diff --git a/src/backend/gporca/libgpopt/src/base/CColRefSet.cpp b/src/backend/gporca/libgpopt/src/base/CColRefSet.cpp index 716e071958..09459441e5 100644 --- a/src/backend/gporca/libgpopt/src/base/CColRefSet.cpp +++ b/src/backend/gporca/libgpopt/src/base/CColRefSet.cpp @@ -19,8 +19,6 @@ using namespace gpopt; -FORCE_GENERATE_DBGSTR(CColRefSet); - //--------------------------------------------------------------------------- // @function: // CColRefSet::CColRefSet diff --git a/src/backend/gporca/libgpos/include/gpos/common/CBitSet.h b/src/backend/gporca/libgpos/include/gpos/common/CBitSet.h index fd52fc4be7..ba16e6393a 100644 --- a/src/backend/gporca/libgpos/include/gpos/common/CBitSet.h +++ b/src/backend/gporca/libgpos/include/gpos/common/CBitSet.h @@ -154,7 +154,7 @@ public: } // print function - IOstream &OsPrint(IOstream &os) const; + virtual IOstream &OsPrint(IOstream &os) const; }; // class CBitSet --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
