You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by "fanfuxiaoran (via GitHub)" <gi...@apache.org> on 2024/12/04 07:54:13 UTC
Re: [PR] WIP: ORCA: Fix eliminate self comparison [cloudberry]
fanfuxiaoran commented on code in PR #722:
URL: https://github.com/apache/cloudberry/pull/722#discussion_r1868887771
##########
src/backend/gporca/libgpopt/src/operators/CExpressionPreprocessor.cpp:
##########
@@ -70,16 +70,23 @@ using namespace gpopt;
// eliminate self comparisons in the given expression
CExpression *
CExpressionPreprocessor::PexprEliminateSelfComparison(CMemoryPool *mp,
- CExpression *pexpr)
+ CExpression *pexpr,
+ CColRefSet *pcrsNotNull)
{
// protect against stack overflow during recursion
GPOS_CHECK_STACK_SIZE;
GPOS_ASSERT(nullptr != mp);
GPOS_ASSERT(nullptr != pexpr);
+ COperator *pop = pexpr->Pop();
if (CUtils::FScalarCmp(pexpr))
{
- return CPredicateUtils::PexprEliminateSelfComparison(mp, pexpr);
+ return CPredicateUtils::PexprEliminateSelfComparison(mp, pexpr,
+ pcrsNotNull);
+ }
+ if (pop->FLogical())
Review Comment:
Fixed! And add regress test case for it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org