greenplumn CPhysicalHashAgg 源码
greenplumn CPhysicalHashAgg 代码
文件路径:/src/backend/gporca/libgpopt/src/operators/CPhysicalHashAgg.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2009 Greenplum, Inc.
//
// @filename:
// CPhysicalHashAgg.cpp
//
// @doc:
// Implementation of hash aggregation operator
//---------------------------------------------------------------------------
#include "gpopt/operators/CPhysicalHashAgg.h"
#include "gpos/base.h"
#include "gpopt/base/CDistributionSpecHashed.h"
#include "gpopt/base/CDistributionSpecSingleton.h"
#include "gpopt/base/COptCtxt.h"
#include "gpopt/operators/CExpressionHandle.h"
using namespace gpopt;
//---------------------------------------------------------------------------
// @function:
// CPhysicalHashAgg::CPhysicalHashAgg
//
// @doc:
// Ctor
//
//---------------------------------------------------------------------------
CPhysicalHashAgg::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)
: CPhysicalAgg(mp, colref_array, pdrgpcrMinimal, egbaggtype,
fGeneratesDuplicates, pdrgpcrArgDQA, fMultiStage,
isAggFromSplitDQA, aggStage, should_enforce_distribution)
{
}
//---------------------------------------------------------------------------
// @function:
// CPhysicalHashAgg::~CPhysicalHashAgg
//
// @doc:
// Dtor
//
//---------------------------------------------------------------------------
CPhysicalHashAgg::~CPhysicalHashAgg() = default;
//---------------------------------------------------------------------------
// @function:
// CPhysicalHashAgg::PosRequired
//
// @doc:
// Compute required sort columns of the n-th child
//
//---------------------------------------------------------------------------
COrderSpec *
CPhysicalHashAgg::PosRequired(CMemoryPool *mp,
CExpressionHandle &, // exprhdl
COrderSpec *, // posRequired
ULONG
#ifdef GPOS_DEBUG
child_index
#endif // GPOS_DEBUG
,
CDrvdPropArray *, // pdrgpdpCtxt
ULONG // ulOptReq
) const
{
GPOS_ASSERT(0 == child_index);
// return empty sort order
return GPOS_NEW(mp) COrderSpec(mp);
}
//---------------------------------------------------------------------------
// @function:
// CPhysicalHashAgg::PosDerive
//
// @doc:
// Derive sort order
//
//---------------------------------------------------------------------------
COrderSpec *
CPhysicalHashAgg::PosDerive(CMemoryPool *mp,
CExpressionHandle & // exprhdl
) const
{
// return empty sort order
return GPOS_NEW(mp) COrderSpec(mp);
}
//---------------------------------------------------------------------------
// @function:
// CPhysicalHashAgg::EpetOrder
//
// @doc:
// Return the enforcing type for order property based on this operator
//
//---------------------------------------------------------------------------
CEnfdProp::EPropEnforcingType
CPhysicalHashAgg::EpetOrder(CExpressionHandle &, // exprhdl
const CEnfdOrder *
#ifdef GPOS_DEBUG
peo
#endif // GPOS_DEBUG
) const
{
GPOS_ASSERT(nullptr != peo);
GPOS_ASSERT(!peo->PosRequired()->IsEmpty());
return CEnfdProp::EpetRequired;
}
// EOF
相关信息
相关文章
greenplumn CExpressionFactorizer 源码
greenplumn CExpressionHandle 源码
greenplumn CExpressionPreprocessor 源码
greenplumn CExpressionUtils 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦