greenplumn CXformImplementSequence 源码
greenplumn CXformImplementSequence 代码
文件路径:/src/backend/gporca/libgpopt/src/xforms/CXformImplementSequence.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2009 Greenplum, Inc.
//
// @filename:
// CXformImplementSequence.cpp
//
// @doc:
// Implementation of transform
//---------------------------------------------------------------------------
#include "gpopt/xforms/CXformImplementSequence.h"
#include "gpos/base.h"
#include "gpopt/metadata/CTableDescriptor.h"
#include "gpopt/operators/CLogicalSequence.h"
#include "gpopt/operators/CPatternMultiLeaf.h"
#include "gpopt/operators/CPhysicalSequence.h"
using namespace gpopt;
//---------------------------------------------------------------------------
// @function:
// CXformImplementSequence::CXformImplementSequence
//
// @doc:
// Ctor
//
//---------------------------------------------------------------------------
CXformImplementSequence::CXformImplementSequence(CMemoryPool *mp)
: CXformImplementation(
// pattern
GPOS_NEW(mp) CExpression(
mp, GPOS_NEW(mp) CLogicalSequence(mp),
GPOS_NEW(mp) CExpression(mp, GPOS_NEW(mp) CPatternMultiLeaf(mp))))
{
}
//---------------------------------------------------------------------------
// @function:
// CXformImplementSequence::Transform
//
// @doc:
// Actual transformation
//
//---------------------------------------------------------------------------
void
CXformImplementSequence::Transform(CXformContext *pxfctxt, CXformResult *pxfres,
CExpression *pexpr) const
{
GPOS_ASSERT(nullptr != pxfctxt);
GPOS_ASSERT(FPromising(pxfctxt->Pmp(), this, pexpr));
GPOS_ASSERT(FCheckPattern(pexpr));
CMemoryPool *mp = pxfctxt->Pmp();
CExpressionArray *pdrgpexpr = pexpr->PdrgPexpr();
pdrgpexpr->AddRef();
// create alternative expression
CExpression *pexprAlt = GPOS_NEW(mp)
CExpression(mp, GPOS_NEW(mp) CPhysicalSequence(mp), pdrgpexpr);
// add alternative to transformation result
pxfres->Add(pexprAlt);
}
// EOF
相关信息
相关文章
greenplumn CJoinOrderGreedy 源码
greenplumn CJoinOrderMinCard 源码
greenplumn CSubqueryHandler 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦