greenplumn CPhysicalInnerHashJoin 源码
greenplumn CPhysicalInnerHashJoin 代码
文件路径:/src/backend/gporca/libgpopt/include/gpopt/operators/CPhysicalInnerHashJoin.h
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2011 EMC Corp.
//
// @filename:
// CPhysicalInnerHashJoin.h
//
// @doc:
// Inner hash join operator
//---------------------------------------------------------------------------
#ifndef GPOPT_CPhysicalInnerHashJoin_H
#define GPOPT_CPhysicalInnerHashJoin_H
#include "gpos/base.h"
#include "gpopt/operators/CPhysicalHashJoin.h"
namespace gpopt
{
//---------------------------------------------------------------------------
// @class:
// CPhysicalInnerHashJoin
//
// @doc:
// Inner hash join operator
//
//---------------------------------------------------------------------------
class CPhysicalInnerHashJoin : public CPhysicalHashJoin
{
private:
// helper for computing a hashed distribution matching the given distribution
CDistributionSpecHashed *PdshashedCreateMatching(
CMemoryPool *mp, CDistributionSpecHashed *pdshashed,
ULONG ulSourceChild) const;
// helper for deriving hash join distribution from hashed children
CDistributionSpec *PdsDeriveFromHashedChildren(
CMemoryPool *mp, CDistributionSpec *pdsOuter,
CDistributionSpec *pdsInner) const;
// helper for deriving hash join distribution from replicated outer child
CDistributionSpec *PdsDeriveFromReplicatedOuter(
CMemoryPool *mp, CDistributionSpec *pdsOuter,
CDistributionSpec *pdsInner) const;
// helper for deriving hash join distribution from hashed outer child
CDistributionSpec *PdsDeriveFromHashedOuter(
CMemoryPool *mp, CDistributionSpec *pdsOuter,
CDistributionSpec *pdsInner) const;
public:
CPhysicalInnerHashJoin(const CPhysicalInnerHashJoin &) = delete;
// ctor
CPhysicalInnerHashJoin(CMemoryPool *mp,
CExpressionArray *pdrgpexprOuterKeys,
CExpressionArray *pdrgpexprInnerKeys,
IMdIdArray *hash_opfamilies,
CXform::EXformId origin_xform = CXform::ExfSentinel);
// dtor
~CPhysicalInnerHashJoin() override;
// ident accessors
EOperatorId
Eopid() const override
{
return EopPhysicalInnerHashJoin;
}
// return a string for operator name
const CHAR *
SzId() const override
{
return "CPhysicalInnerHashJoin";
}
// conversion function
static CPhysicalInnerHashJoin *
PopConvert(COperator *pop)
{
GPOS_ASSERT(EopPhysicalInnerHashJoin == pop->Eopid());
return dynamic_cast<CPhysicalInnerHashJoin *>(pop);
}
// derive distribution
CDistributionSpec *PdsDerive(CMemoryPool *mp,
CExpressionHandle &exprhdl) const override;
CPartitionPropagationSpec *PppsRequired(
CMemoryPool *mp, CExpressionHandle &exprhdl,
CPartitionPropagationSpec *pppsRequired, ULONG child_index,
CDrvdPropArray *pdrgpdpCtxt, ULONG ulOptReq) const override;
CPartitionPropagationSpec *PppsDerive(
CMemoryPool *mp, CExpressionHandle &exprhdl) const override;
}; // class CPhysicalInnerHashJoin
} // namespace gpopt
#endif // !GPOPT_CPhysicalInnerHashJoin_H
// EOF
相关信息
相关文章
greenplumn CExpressionFactorizer 源码
greenplumn CExpressionHandle 源码
greenplumn CExpressionPreprocessor 源码
greenplumn CExpressionUtils 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
6、 golang
-
8、 openharmony