greenplumn CPhysicalUnionAllFactory 源码
greenplumn CPhysicalUnionAllFactory 代码
文件路径:/src/backend/gporca/libgpopt/src/operators/CPhysicalUnionAllFactory.cpp
// Greenplum Database
// Copyright (C) 2016 VMware, Inc. or its affiliates.
#include "gpopt/operators/CPhysicalUnionAllFactory.h"
#include "gpos/base.h"
#include "gpopt/exception.h"
#include "gpopt/operators/CPhysicalParallelUnionAll.h"
#include "gpopt/operators/CPhysicalSerialUnionAll.h"
#include "gpopt/xforms/CXformUtils.h"
namespace gpopt
{
CPhysicalUnionAllFactory::CPhysicalUnionAllFactory(
CLogicalUnionAll *popLogicalUnionAll)
: m_popLogicalUnionAll(popLogicalUnionAll)
{
}
CPhysicalUnionAll *
CPhysicalUnionAllFactory::PopPhysicalUnionAll(CMemoryPool *mp, BOOL fParallel)
{
CColRefArray *pdrgpcrOutput = m_popLogicalUnionAll->PdrgpcrOutput();
CColRef2dArray *pdrgpdrgpcrInput = m_popLogicalUnionAll->PdrgpdrgpcrInput();
// TODO: May 2nd 2012; support compatible types
if (!CXformUtils::FSameDatatype(pdrgpdrgpcrInput))
{
GPOS_RAISE(gpopt::ExmaGPOPT, gpopt::ExmiUnsupportedOp,
GPOS_WSZ_LIT("Union of non-identical types"));
}
pdrgpcrOutput->AddRef();
pdrgpdrgpcrInput->AddRef();
if (fParallel)
{
return GPOS_NEW(mp)
CPhysicalParallelUnionAll(mp, pdrgpcrOutput, pdrgpdrgpcrInput);
}
else
{
return GPOS_NEW(mp)
CPhysicalSerialUnionAll(mp, pdrgpcrOutput, pdrgpdrgpcrInput);
}
}
} // namespace gpopt
相关信息
相关文章
greenplumn CExpressionFactorizer 源码
greenplumn CExpressionHandle 源码
greenplumn CExpressionPreprocessor 源码
greenplumn CExpressionUtils 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦