greenplumn CLogicalLeftSemiApply 源码
greenplumn CLogicalLeftSemiApply 代码
文件路径:/src/backend/gporca/libgpopt/src/operators/CLogicalLeftSemiApply.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2011 EMC Corp.
//
// @filename:
// CLogicalLeftSemiApply.cpp
//
// @doc:
// Implementation of left semi-apply operator
//---------------------------------------------------------------------------
#include "gpopt/operators/CLogicalLeftSemiApply.h"
#include "gpos/base.h"
#include "gpopt/base/CColRefSet.h"
#include "gpopt/operators/CExpression.h"
#include "gpopt/operators/CExpressionHandle.h"
using namespace gpopt;
//---------------------------------------------------------------------------
// @function:
// CLogicalLeftSemiApply::DeriveMaxCard
//
// @doc:
// Derive max card
//
//---------------------------------------------------------------------------
CMaxCard
CLogicalLeftSemiApply::DeriveMaxCard(CMemoryPool *, // mp
CExpressionHandle &exprhdl) const
{
return CLogical::Maxcard(exprhdl, 2 /*ulScalarIndex*/,
exprhdl.DeriveMaxCard(0));
}
//---------------------------------------------------------------------------
// @function:
// CLogicalLeftSemiApply::PxfsCandidates
//
// @doc:
// Get candidate xforms
//
//---------------------------------------------------------------------------
CXformSet *
CLogicalLeftSemiApply::PxfsCandidates(CMemoryPool *mp) const
{
CXformSet *xform_set = GPOS_NEW(mp) CXformSet(mp);
(void) xform_set->ExchangeSet(CXform::ExfLeftSemiApply2LeftSemiJoin);
(void) xform_set->ExchangeSet(
CXform::ExfLeftSemiApplyWithExternalCorrs2InnerJoin);
(void) xform_set->ExchangeSet(
CXform::ExfLeftSemiApply2LeftSemiJoinNoCorrelations);
return xform_set;
}
//---------------------------------------------------------------------------
// @function:
// CLogicalLeftSemiApply::DeriveOutputColumns
//
// @doc:
// Derive output columns
//
//---------------------------------------------------------------------------
CColRefSet *
CLogicalLeftSemiApply::DeriveOutputColumns(CMemoryPool *, // mp
CExpressionHandle &exprhdl)
{
GPOS_ASSERT(3 == exprhdl.Arity());
return PcrsDeriveOutputPassThru(exprhdl);
}
//---------------------------------------------------------------------------
// @function:
// CLogicalLeftSemiApply::PopCopyWithRemappedColumns
//
// @doc:
// Return a copy of the operator with remapped columns
//
//---------------------------------------------------------------------------
COperator *
CLogicalLeftSemiApply::PopCopyWithRemappedColumns(
CMemoryPool *mp, UlongToColRefMap *colref_mapping, BOOL must_exist)
{
CColRefArray *pdrgpcrInner =
CUtils::PdrgpcrRemap(mp, m_pdrgpcrInner, colref_mapping, must_exist);
return GPOS_NEW(mp)
CLogicalLeftSemiApply(mp, pdrgpcrInner, m_eopidOriginSubq);
}
// EOF
相关信息
相关文章
greenplumn CExpressionFactorizer 源码
greenplumn CExpressionHandle 源码
greenplumn CExpressionPreprocessor 源码
greenplumn CExpressionUtils 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦