greenplumn CJoinOrderGreedy 源码
greenplumn CJoinOrderGreedy 代码
文件路径:/src/backend/gporca/libgpopt/include/gpopt/xforms/CJoinOrderGreedy.h
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2018 VMware, Inc. or its affiliates.
//
// @filename:
// CJoinOrderGreedy.h
//
// @doc:
// Cardinality-based join order generation with delayed cross joins
//---------------------------------------------------------------------------
#ifndef GPOPT_CJoinOrderGreedy_H
#define GPOPT_CJoinOrderGreedy_H
#include "gpos/base.h"
#include "gpos/io/IOstream.h"
#include "gpopt/xforms/CJoinOrder.h"
namespace gpopt
{
using namespace gpos;
//---------------------------------------------------------------------------
// @class:
// CJoinOrderGreedy
//
// @doc:
// Helper class for creating join orders based on cardinality of results
//
//---------------------------------------------------------------------------
class CJoinOrderGreedy : public CJoinOrder
{
private:
// result component
SComponent *m_pcompResult;
// returns starting joins with minimal cardinality
SComponent *GetStartingJoins();
public:
// ctor
CJoinOrderGreedy(CMemoryPool *pmp, CExpressionArray *pdrgpexprComponents,
CExpressionArray *pdrgpexprConjuncts);
// dtor
~CJoinOrderGreedy() override;
// main handler
virtual CExpression *PexprExpand();
ULONG
PickBestJoin(CBitSet *candidate_nodes);
CBitSet *GetAdjacentComponentsToJoinCandidate();
CXform::EXformId
EOriginXForm() const override
{
return CXform::ExfExpandNAryJoinGreedy;
}
}; // class CJoinOrderGreedy
} // namespace gpopt
#endif // !GPOPT_CJoinOrderGreedy_H
// EOF
相关信息
相关文章
greenplumn CJoinOrderMinCard 源码
greenplumn CSubqueryHandler 源码
greenplumn CXformAntiSemiJoinAntiSemiJoinNotInSwap 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦