Waloid24 commented on code in PR #2007:
URL: https://github.com/apache/cloudberry/pull/2007#discussion_r4035418530


##########
src/backend/gporca/libnaucrates/src/statistics/CScaleFactorUtils.cpp:
##########
@@ -502,12 +502,25 @@ CScaleFactorUtils::CalcScaleFactorCumulativeConj(
 
        const ULONG num_cols = scale_factors->Size();
        CDouble scale_factor(1.0);
+       if (0 == num_cols)

Review Comment:
   Right, `GPOS_ASSERT(0 < num_cols)` will be better for the current usage of 
this function. We always add one element to the `scale_factors` array before 
calling `CalcScaleFactorCumulativeConj`, so for the possible future changes 
from other contributors it will be better to express our expectations with 
`GPOS_ASSERT`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to