jiaqizho commented on code in PR #722:
URL: https://github.com/apache/cloudberry/pull/722#discussion_r1861773478


##########
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:
   The `Derive*` is not related to the CExpression type(logic/scalar/phy, also 
no phy CExpression will occar in the CExpressionPreprocessor) . 
   
   So i guess the `CDrvdProp` always return true. when it check the 
`m_is_prop_derived`.



-- 
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-unsubscr...@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: commits-h...@cloudberry.apache.org

Reply via email to