greenplumn CPhysicalLeftOuterIndexNLJoin 源码
greenplumn CPhysicalLeftOuterIndexNLJoin 代码
文件路径:/src/backend/gporca/libgpopt/include/gpopt/operators/CPhysicalLeftOuterIndexNLJoin.h
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2017 VMware, Inc. or its affiliates.
//
// Left outer index nested-loops join operator
//---------------------------------------------------------------------------
#ifndef GPOPT_CPhysicalLeftOuterIndexNLJoin_H
#define GPOPT_CPhysicalLeftOuterIndexNLJoin_H
#include "gpos/base.h"
#include "gpopt/operators/CPhysicalLeftOuterNLJoin.h"
namespace gpopt
{
class CPhysicalLeftOuterIndexNLJoin : public CPhysicalLeftOuterNLJoin
{
private:
// columns from outer child used for index lookup in inner child
CColRefArray *m_pdrgpcrOuterRefs;
// a copy of the original join predicate that has been pushed down to the inner side
CExpression *m_origJoinPred;
public:
CPhysicalLeftOuterIndexNLJoin(const CPhysicalLeftOuterIndexNLJoin &) =
delete;
// ctor
CPhysicalLeftOuterIndexNLJoin(CMemoryPool *mp, CColRefArray *colref_array,
CExpression *origJoinPred);
// dtor
~CPhysicalLeftOuterIndexNLJoin() override;
CEnfdProp::EPropEnforcingType EpetDistribution(
CExpressionHandle &exprhdl,
const CEnfdDistribution *ped) const override;
// ident accessors
EOperatorId
Eopid() const override
{
return EopPhysicalLeftOuterIndexNLJoin;
}
// return a string for operator name
const CHAR *
SzId() const override
{
return "CPhysicalLeftOuterIndexNLJoin";
}
// match function
BOOL Matches(COperator *pop) const override;
// outer column references accessor
CColRefArray *
PdrgPcrOuterRefs() const
{
return m_pdrgpcrOuterRefs;
}
// compute required distribution of the n-th child
CDistributionSpec *PdsRequired(CMemoryPool *mp, CExpressionHandle &exprhdl,
CDistributionSpec *pdsRequired,
ULONG child_index,
CDrvdPropArray *pdrgpdpCtxt,
ULONG ulOptReq) const override;
CEnfdDistribution *Ped(CMemoryPool *mp, CExpressionHandle &exprhdl,
CReqdPropPlan *prppInput, ULONG child_index,
CDrvdPropArray *pdrgpdpCtxt,
ULONG ulDistrReq) override;
// execution order of children
EChildExecOrder
Eceo() const override
{
// we optimize inner (right) child first to be able to match child hashed distributions
return EceoRightToLeft;
}
// conversion function
static CPhysicalLeftOuterIndexNLJoin *
PopConvert(COperator *pop)
{
GPOS_ASSERT(EopPhysicalLeftOuterIndexNLJoin == pop->Eopid());
return dynamic_cast<CPhysicalLeftOuterIndexNLJoin *>(pop);
}
CExpression *
OrigJoinPred()
{
return m_origJoinPred;
}
}; // class CPhysicalLeftOuterIndexNLJoin
} // namespace gpopt
#endif // !GPOPT_CPhysicalLeftOuterIndexNLJoin_H
// EOF
相关信息
相关文章
greenplumn CExpressionFactorizer 源码
greenplumn CExpressionHandle 源码
greenplumn CExpressionPreprocessor 源码
greenplumn CExpressionUtils 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦