greenplumn CXformLeftAntiSemiJoinNotIn2HashJoinNotIn 源码
greenplumn CXformLeftAntiSemiJoinNotIn2HashJoinNotIn 代码
文件路径:/src/backend/gporca/libgpopt/src/xforms/CXformLeftAntiSemiJoinNotIn2HashJoinNotIn.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2013 EMC Corp.
//
// @filename:
// CXformLeftAntiSemiJoinNotIn2HashJoinNotIn.cpp
//
// @doc:
// Implementation of transform
//---------------------------------------------------------------------------
#include "gpopt/xforms/CXformLeftAntiSemiJoinNotIn2HashJoinNotIn.h"
#include "gpos/base.h"
#include "gpopt/operators/CLogicalLeftAntiSemiJoinNotIn.h"
#include "gpopt/operators/CPatternLeaf.h"
#include "gpopt/operators/CPhysicalLeftAntiSemiHashJoinNotIn.h"
#include "gpopt/operators/CPredicateUtils.h"
#include "gpopt/xforms/CXformUtils.h"
using namespace gpopt;
//---------------------------------------------------------------------------
// @function:
// CXformLeftAntiSemiJoinNotIn2HashJoinNotIn::CXformLeftAntiSemiJoinNotIn2HashJoinNotIn
//
// @doc:
// ctor
//
//---------------------------------------------------------------------------
CXformLeftAntiSemiJoinNotIn2HashJoinNotIn::
CXformLeftAntiSemiJoinNotIn2HashJoinNotIn(CMemoryPool *mp)
: // pattern
CXformImplementation(GPOS_NEW(mp) CExpression(
mp, GPOS_NEW(mp) CLogicalLeftAntiSemiJoinNotIn(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:
// CXformLeftAntiSemiJoinNotIn2HashJoinNotIn::Exfp
//
// @doc:
// Compute xform promise for a given expression handle;
//
//---------------------------------------------------------------------------
CXform::EXformPromise
CXformLeftAntiSemiJoinNotIn2HashJoinNotIn::Exfp(
CExpressionHandle &exprhdl) const
{
return CXformUtils::ExfpLogicalJoin2PhysicalJoin(exprhdl);
}
//---------------------------------------------------------------------------
// @function:
// CXformLeftAntiSemiJoinNotIn2HashJoinNotIn::Transform
//
// @doc:
// actual transformation
//
//---------------------------------------------------------------------------
void
CXformLeftAntiSemiJoinNotIn2HashJoinNotIn::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<CPhysicalLeftAntiSemiHashJoinNotIn>(
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<CPhysicalLeftAntiSemiHashJoinNotIn>(
pxfctxt, pxfres, pexprProcessed);
pexprProcessed->Release();
}
}
}
// EOF
相关信息
相关文章
greenplumn CJoinOrderGreedy 源码
greenplumn CJoinOrderMinCard 源码
greenplumn CSubqueryHandler 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦