Alena0704 commented on code in PR #1719:
URL: https://github.com/apache/cloudberry/pull/1719#discussion_r3206538031
##########
src/backend/gporca/libgpopt/src/translate/CTranslatorExprToDXL.cpp:
##########
@@ -4250,6 +4264,10 @@ CTranslatorExprToDXL::BuildScalarSubplans(
{
const ULONG size = pdrgpcrInner->Size();
+ // Fallback to Postgres optimizer if the SubPlan's inner expression
contains a
+ // CTE Consumer whose Producer lives outside this subtree. Such a
Consumer
+ // would become a cross-slice Shared Scan reader without a local
Producer,
+ // which can hang the query or fail at execution time.
Review Comment:
fixed but i rewrote the comment on my way - now it matches with condition
when we try to detect all Consumers that placed on a different slice than its
replicated Producer. it looks like this now:
```
// Fallback to Postgres optimizer if the SubPlan's inner expression contains
a
// CTE Consumer placed on a different slice than its replicated
Producer.
// Such a Consumer becomes a cross-slice Shared Scan reader without a
local
// Producer, which can hang the query or fail at execution time.
if (CUtils::FHasCrossSliceReplicatedCTEConsumer(m_mp, pexprInner))
{
GPOS_RAISE(
gpopt::ExmaDXL, gpopt::ExmiExpr2DXLUnsupportedFeature,
GPOS_WSZ_LIT(
"CTE Consumer placed on a different slice than
its replicated Producer"));
}
```
--
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]