This is an automated email from the ASF dual-hosted git repository.

tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new 7cb63305934 Remove redundant scale factor sort
7cb63305934 is described below

commit 7cb63305934f01791ac2b79df74707767f9c016b
Author: Andrey Kazachkov <[email protected]>
AuthorDate: Wed Sep 30 15:59:52 2026 +0300

    Remove redundant scale factor sort
    
    CalcScaleFactorCumulativeConj() already sorts scale factors in descending
    order, so sorting them at the call site performs the same work twice.
    
    Also remove the null assertion after Append(), since scale_factors has
    already been dereferenced at that point and is initialized earlier in the
    function.
---
 .../gporca/libnaucrates/src/statistics/CFilterStatsProcessor.cpp       | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/src/backend/gporca/libnaucrates/src/statistics/CFilterStatsProcessor.cpp 
b/src/backend/gporca/libnaucrates/src/statistics/CFilterStatsProcessor.cpp
index a7e458ec353..ec174da52a1 100644
--- a/src/backend/gporca/libnaucrates/src/statistics/CFilterStatsProcessor.cpp
+++ b/src/backend/gporca/libnaucrates/src/statistics/CFilterStatsProcessor.cpp
@@ -461,9 +461,6 @@ CFilterStatsProcessor::MakeHistHashMapConjFilter(
        // scaling factor of the last predicate
        scale_factors->Append(GPOS_NEW(mp) CDouble(last_scale_factor));
 
-       GPOS_ASSERT(nullptr != scale_factors);
-       CScaleFactorUtils::SortScalingFactor(scale_factors, true /* fDescending 
*/);
-
        *scale_factor = CScaleFactorUtils::CalcScaleFactorCumulativeConj(
                stats_config, scale_factors);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to