greenplumn CStatsPredUnsupported 源码
greenplumn CStatsPredUnsupported 代码
文件路径:/src/backend/gporca/libnaucrates/src/statistics/CStatsPredUnsupported.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2014 VMware, Inc. or its affiliates.
//
// @filename:
// CStatsPredUnsupported.cpp
//
// @doc:
// Implementation of unsupported statistics predicate
//---------------------------------------------------------------------------
#include "naucrates/statistics/CStatsPredUnsupported.h"
#include "naucrates/statistics/CHistogram.h"
#include "naucrates/statistics/CStatistics.h"
using namespace gpnaucrates;
//---------------------------------------------------------------------------
// @function:
// CStatsPredUnsupported::CStatsPredUnsupported
//
// @doc:
// Ctor
//
//---------------------------------------------------------------------------
CStatsPredUnsupported::CStatsPredUnsupported(
ULONG colid, CStatsPred::EStatsCmpType stats_cmp_type)
: CStatsPred(colid),
m_stats_cmp_type(stats_cmp_type),
m_default_scale_factor(0.0)
{
m_default_scale_factor = InitScaleFactor();
}
//---------------------------------------------------------------------------
// @function:
// CStatsPredUnsupported::CStatsPredUnsupported
//
// @doc:
// Ctor
//
//---------------------------------------------------------------------------
CStatsPredUnsupported::CStatsPredUnsupported(
ULONG colid, CStatsPred::EStatsCmpType stats_cmp_type,
CDouble default_scale_factor)
: CStatsPred(colid),
m_stats_cmp_type(stats_cmp_type),
m_default_scale_factor(default_scale_factor)
{
GPOS_ASSERT(CStatistics::Epsilon < default_scale_factor);
}
//---------------------------------------------------------------------------
// CStatsPredUnsupported::InitScaleFactor
//
// @doc:
// Initialize the scale factor of the unknown predicate
//---------------------------------------------------------------------------
CDouble
CStatsPredUnsupported::InitScaleFactor()
{
return (1 / CHistogram::DefaultSelectivity).Get();
}
// EOF
相关信息
相关文章
greenplumn CFilterStatsProcessor 源码
greenplumn CGroupByStatsProcessor 源码
greenplumn CInnerJoinStatsProcessor 源码
greenplumn CJoinStatsProcessor 源码
greenplumn CLeftAntiSemiJoinStatsProcessor 源码
greenplumn CLeftOuterJoinStatsProcessor 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦