greenplumn CPhysicalHashAgg 源码
greenplumn CPhysicalHashAgg 代码
文件路径:/src/backend/gporca/libgpopt/include/gpopt/operators/CPhysicalHashAgg.h
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2009 Greenplum, Inc.
//
// @filename:
// CPhysicalHashAgg.h
//
// @doc:
// Hash Aggregate operator
//---------------------------------------------------------------------------
#ifndef GPOS_CPhysicalHashAgg_H
#define GPOS_CPhysicalHashAgg_H
#include "gpos/base.h"
#include "gpopt/operators/CPhysicalAgg.h"
namespace gpopt
{
// fwd declaration
class CDistributionSpec;
//---------------------------------------------------------------------------
// @class:
// CPhysicalHashAgg
//
// @doc:
// Hash-based aggregate operator
//
//---------------------------------------------------------------------------
class CPhysicalHashAgg : public CPhysicalAgg
{
private:
public:
CPhysicalHashAgg(const CPhysicalHashAgg &) = delete;
// ctor
CPhysicalHashAgg(CMemoryPool *mp, CColRefArray *colref_array,
CColRefArray *pdrgpcrMinimal,
COperator::EGbAggType egbaggtype,
BOOL fGeneratesDuplicates, CColRefArray *pdrgpcrArgDQA,
BOOL fMultiStage, BOOL isAggFromSplitDQA,
CLogicalGbAgg::EAggStage aggStage,
BOOL should_enforce_distribution = true
// should_enforce_distribution should be set to false if
// 'local' and 'global' splits don't need to have different
// distributions. This flag is set to false if the local
// aggregate has been created by CXformEagerAgg.
);
// dtor
~CPhysicalHashAgg() override;
// ident accessors
EOperatorId
Eopid() const override
{
return EopPhysicalHashAgg;
}
// return a string for operator name
const CHAR *
SzId() const override
{
return "CPhysicalHashAgg";
}
//-------------------------------------------------------------------------------------
// Required Plan Properties
//-------------------------------------------------------------------------------------
// compute required sort columns of the n-th child
COrderSpec *PosRequired(CMemoryPool *mp, CExpressionHandle &exprhdl,
COrderSpec *posRequired, ULONG child_index,
CDrvdPropArray *pdrgpdpCtxt,
ULONG ulOptReq) const override;
//-------------------------------------------------------------------------------------
// Derived Plan Properties
//-------------------------------------------------------------------------------------
// derive sort order
COrderSpec *PosDerive(CMemoryPool *mp,
CExpressionHandle &exprhdl) const override;
//-------------------------------------------------------------------------------------
// Enforced Properties
//-------------------------------------------------------------------------------------
// return order property enforcing type for this operator
CEnfdProp::EPropEnforcingType EpetOrder(
CExpressionHandle &exprhdl, const CEnfdOrder *peo) const override;
//-------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------
// conversion function
static CPhysicalHashAgg *
PopConvert(COperator *pop)
{
GPOS_ASSERT(nullptr != pop);
GPOS_ASSERT(EopPhysicalHashAgg == pop->Eopid() ||
EopPhysicalHashAggDeduplicate == pop->Eopid());
return dynamic_cast<CPhysicalHashAgg *>(pop);
}
}; // class CPhysicalHashAgg
} // namespace gpopt
#endif // !GPOS_CPhysicalHashAgg_H
// EOF
相关信息
相关文章
greenplumn CExpressionFactorizer 源码
greenplumn CExpressionHandle 源码
greenplumn CExpressionPreprocessor 源码
greenplumn CExpressionUtils 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦