greenplumn CXformLeftAntiSemiJoin2HashJoin 源码
greenplumn CXformLeftAntiSemiJoin2HashJoin 代码
文件路径:/src/backend/gporca/libgpopt/src/xforms/CXformLeftAntiSemiJoin2HashJoin.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2011 EMC Corp.
//
// @filename:
// CXformLeftAntiSemiJoin2HashJoin.cpp
//
// @doc:
// Implementation of transform
//---------------------------------------------------------------------------
#include "gpopt/xforms/CXformLeftAntiSemiJoin2HashJoin.h"
#include "gpos/base.h"
#include "gpopt/operators/CLogicalLeftAntiSemiJoin.h"
#include "gpopt/operators/CPatternLeaf.h"
#include "gpopt/operators/CPatternTree.h"
#include "gpopt/operators/CPhysicalLeftAntiSemiHashJoin.h"
#include "gpopt/operators/CPredicateUtils.h"
#include "gpopt/xforms/CXformUtils.h"
using namespace gpopt;
//---------------------------------------------------------------------------
// @function:
// CXformLeftAntiSemiJoin2HashJoin::CXformLeftAntiSemiJoin2HashJoin
//
// @doc:
// ctor
//
//---------------------------------------------------------------------------
CXformLeftAntiSemiJoin2HashJoin::CXformLeftAntiSemiJoin2HashJoin(
CMemoryPool *mp)
: // pattern
CXformImplementation(GPOS_NEW(mp) CExpression(
mp, GPOS_NEW(mp) CLogicalLeftAntiSemiJoin(mp),
GPOS_NEW(mp)
CExpression(mp, GPOS_NEW(mp) CPatternLeaf(mp)), // left child
GPOS_NEW(mp)
CExpression(mp, GPOS_NEW(mp) CPatternLeaf(mp)), // right child
GPOS_NEW(mp)
CExpression(mp, GPOS_NEW(mp) CPatternTree(mp)) // predicate
))
{
}
//---------------------------------------------------------------------------
// @function:
// CXformLeftAntiSemiJoin2HashJoin::Exfp
//
// @doc:
// Compute xform promise for a given expression handle;
//
//---------------------------------------------------------------------------
CXform::EXformPromise
CXformLeftAntiSemiJoin2HashJoin::Exfp(CExpressionHandle &exprhdl) const
{
return CXformUtils::ExfpLogicalJoin2PhysicalJoin(exprhdl);
}
//---------------------------------------------------------------------------
// @function:
// CXformLeftAntiSemiJoin2HashJoin::Transform
//
// @doc:
// actual transformation
//
//---------------------------------------------------------------------------
void
CXformLeftAntiSemiJoin2HashJoin::Transform(CXformContext *pxfctxt,
CXformResult *pxfres,
CExpression *pexpr) const
{
GPOS_ASSERT(nullptr != pxfctxt);
GPOS_ASSERT(FPromising(pxfctxt->Pmp(), this, pexpr));
GPOS_ASSERT(FCheckPattern(pexpr));
CXformUtils::ImplementHashJoin<CPhysicalLeftAntiSemiHashJoin>(
pxfctxt, pxfres, pexpr);
if (pxfres->Pdrgpexpr()->Size() == 0)
{
CExpression *pexprProcessed = nullptr;
if (CXformUtils::FProcessGPDBAntiSemiHashJoin(pxfctxt->Pmp(), pexpr,
&pexprProcessed))
{
// try again after simplifying join predicate
CXformUtils::ImplementHashJoin<CPhysicalLeftAntiSemiHashJoin>(
pxfctxt, pxfres, pexprProcessed);
pexprProcessed->Release();
}
}
}
// EOF
相关信息
相关文章
greenplumn CJoinOrderGreedy 源码
greenplumn CJoinOrderMinCard 源码
greenplumn CSubqueryHandler 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦