greenplumn CStatsPredLike 源码
greenplumn CStatsPredLike 代码
文件路径:/src/backend/gporca/libnaucrates/include/naucrates/statistics/CStatsPredLike.h
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2013 EMC Corp.
//
// @filename:
// CStatsPredLike.h
//
// @doc:
// LIKE filter for statistics
//---------------------------------------------------------------------------
#ifndef GPNAUCRATES_CStatsPredLike_H
#define GPNAUCRATES_CStatsPredLike_H
#include "gpos/base.h"
#include "naucrates/md/IMDType.h"
#include "naucrates/statistics/CStatsPred.h"
// fwd decl
namespace gpopt
{
class CExpression;
}
namespace gpnaucrates
{
using namespace gpos;
using namespace gpmd;
//---------------------------------------------------------------------------
// @class:
// CStatsPredLike
//
// @doc:
// LIKE filter for statistics
//---------------------------------------------------------------------------
class CStatsPredLike : public CStatsPred
{
private:
// left hand side of the LIKE expression
CExpression *m_expr_left;
// right hand side of the LIKE expression
CExpression *m_expr_right;
// default scale factor
CDouble m_default_scale_factor;
public:
CStatsPredLike &operator=(CStatsPredLike &) = delete;
CStatsPredLike(const CStatsPredLike &) = delete;
// ctor
CStatsPredLike(ULONG colid, CExpression *expr_left, CExpression *expr_right,
CDouble default_scale_factor);
// dtor
~CStatsPredLike() override;
// the column identifier on which the predicates are on
ULONG GetColId() const override;
// filter type id
EStatsPredType
GetPredStatsType() const override
{
return CStatsPred::EsptLike;
}
// left hand side of the LIKE expression
virtual CExpression *
GetExprOnLeft() const
{
return m_expr_left;
}
// right hand side of the LIKE expression
virtual CExpression *
GetExprOnRight() const
{
return m_expr_right;
}
// default scale factor
virtual CDouble DefaultScaleFactor() const;
// conversion function
static CStatsPredLike *
ConvertPredStats(CStatsPred *pred_stats)
{
GPOS_ASSERT(nullptr != pred_stats);
GPOS_ASSERT(CStatsPred::EsptLike == pred_stats->GetPredStatsType());
return dynamic_cast<CStatsPredLike *>(pred_stats);
}
}; // class CStatsPredLike
} // namespace gpnaucrates
#endif // !GPNAUCRATES_CStatsPredLike_H
// EOF
相关信息
相关文章
greenplumn CFilterStatsProcessor 源码
greenplumn CGroupByStatsProcessor 源码
greenplumn CInnerJoinStatsProcessor 源码
greenplumn CJoinStatsProcessor 源码
greenplumn CLeftAntiSemiJoinStatsProcessor 源码
greenplumn CLeftOuterJoinStatsProcessor 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦