my-ship-it commented on code in PR #1398:
URL: https://github.com/apache/cloudberry/pull/1398#discussion_r2447308871
##########
src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp:
##########
@@ -6156,9 +6297,11 @@ CTranslatorDXLToPlStmt::TranslatePlanCosts(const
CDXLNode *dxlnode, Plan *plan)
// process, whereas the row estimates in GPORCA are global, across all
// processes. Divide the row count estimate by the number of segments
// executing it.
- plan->plan_rows =
- ceil(CostFromStr(costs->GetRowsOutStr()) /
-
m_dxl_to_plstmt_context->GetCurrentSlice()->numsegments);
+ PlanSlice *current_slice = m_dxl_to_plstmt_context->GetCurrentSlice();
+ double total_rows = CostFromStr(costs->GetRowsOutStr());
+ double rows_per_segment = total_rows / current_slice->numsegments;
+
+ plan->plan_rows = ceil(rows_per_segment);
Review Comment:
Why change codes here?
--
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]