Skip to content

[WIP] Try to fix orca cannot generate plan for hashjoin with partition table #984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions src/backend/gporca/libgpopt/src/operators/CPhysicalHashJoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,7 @@ CPhysicalHashJoin::CreateOptRequests(CMemoryPool *mp)
ULONG ulDistrReqs =
GPOPT_NON_HASH_DIST_REQUESTS + m_pdrgpdsRedistributeRequests->Size();
SetDistrRequests(ulDistrReqs);
SetPartPropagateRequests(2);

// With DP enabled, there are several (max 10 controlled by macro)
// alternatives generated for a join tree and during optimization of those
Expand All @@ -1194,17 +1195,7 @@ CPhysicalHashJoin::CreateOptRequests(CMemoryPool *mp)
// some cases, but can create better alternatives to DPE, so
// we also generate this additional request for expressions that originated
// from CXformExpandNAryJoinGreedy.
CPhysicalJoin *physical_join = dynamic_cast<CPhysicalJoin *>(this);
if ((GPOPT_FDISABLED_XFORM(CXform::ExfExpandNAryJoinDP) &&
GPOPT_FDISABLED_XFORM(CXform::ExfExpandNAryJoinDPv2)) ||
physical_join->OriginXform() == CXform::ExfExpandNAryJoinGreedy)
{
SetPartPropagateRequests(2);
}
else
{
SetPartPropagateRequests(1);
}
SetPartPropagateRequests(2);
}

CExpression *
Expand Down
Loading