MobilityDB 1.1
Functions
temporal_selfuncs.c File Reference
#include "pg_general/temporal_selfuncs.h"
#include <assert.h>
#include <access/amapi.h>
#include <access/heapam.h>
#include <access/htup_details.h>
#include <access/itup.h>
#include <access/relscan.h>
#include <access/visibilitymap.h>
#include <access/skey.h>
#include <catalog/pg_collation_d.h>
#include <parser/parsetree.h>
#include <executor/tuptable.h>
#include <optimizer/paths.h>
#include <storage/bufmgr.h>
#include <utils/date.h>
#include <utils/datum.h>
#include <utils/memutils.h>
#include <utils/rel.h>
#include <utils/syscache.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/spanset.h"
#include "pg_general/meos_catalog.h"
#include "pg_general/span_selfuncs.h"
#include "pg_general/temporal_analyze.h"
#include "pg_point/tpoint_selfuncs.h"
Include dependency graph for temporal_selfuncs.c:

Functions

static bool temporal_const_to_period (Node *other, Span *period)
 Functions for selectivity estimation of operators on temporal types whose bounding box is a Period, that is, tbool and ttext. More...
 
PGDLLEXPORT Datum Temporal_joinsel (PG_FUNCTION_ARGS)
 
float8 temporal_joinsel (PlannerInfo *root, Oid operid, List *args, JoinType jointype, SpecialJoinInfo *sjinfo, TemporalFamily tempfamily)
 Return an estimate of the join selectivity for columns of temporal values. More...
 
float8 temporal_joinsel_default (Oid operid)
 Return a default join selectivity estimate for given operator, when we don't have statistics or cannot use them for some reason. More...
 
float8 temporal_joinsel_ext (FunctionCallInfo fcinfo, TemporalFamily tempfamily)
 
static bool temporal_oper_sel (meosOper oper, meosType ltype, meosType rtype)
 Return the enum value associated to the operator. More...
 
static bool temporal_oper_sel_family (meosOper oper, meosType ltype, meosType rtype, TemporalFamily tempfamily)
 Get enumeration value associated to the operator according to the family. More...
 
PGDLLEXPORT Datum Temporal_sel (PG_FUNCTION_ARGS)
 Estimate the selectivity value of the operators for temporal types whose bounding box is a period, that is, tbool and ttext. More...
 
float8 temporal_sel (PlannerInfo *root, Oid operid, List *args, int varRelid, TemporalFamily tempfamily)
 Estimate the selectivity value of the operators for temporal types whose bounding box is a period, that is, tbool and ttext. More...
 
static double temporal_sel_default (meosOper oper)
 Return a default selectivity estimate for the operator when we don't have statistics or cannot use them for some reason. More...
 
float8 temporal_sel_ext (FunctionCallInfo fcinfo, TemporalFamily tempfamily)
 
Selectivity temporal_sel_period (VariableStatData *vardata, Span *period, meosOper oper)
 Return an estimate of the selectivity of the search period and the operator for columns of temporal values. More...
 
PGDLLEXPORT Datum Tnpoint_joinsel (PG_FUNCTION_ARGS)
 Estimate the join selectivity of the operators for temporal network points. More...
 
bool tnpoint_oper_sel (Oid operid, meosType ltype, meosType rtype)
 Get the enum value associated to the operator. More...
 
PGDLLEXPORT Datum Tnpoint_sel (PG_FUNCTION_ARGS)
 Estimate the restriction selectivity of the operators for temporal network points. More...
 
bool tnumber_const_to_span_period (const Node *other, Span **s, Span **p, meosType basetype)
 Transform the constant into a temporal box. More...
 
PGDLLEXPORT Datum Tnumber_joinsel (PG_FUNCTION_ARGS)
 Estimate the join selectivity value of the operators for temporal numbers. More...
 
static bool tnumber_joinsel_components (meosOper oper, meosType oprleft, meosType oprright, bool *value, bool *time)
 Depending on the operator and the arguments, determine wheter the value, the time, or both components are taken into account for computing the join selectivity. More...
 
float8 tnumber_joinsel_default (meosOper oper)
 Return a default join selectivity estimate for given operator, when we don't have statistics or cannot use them for some reason. More...
 
bool tnumber_oper_sel (Oid operid, meosType ltype, meosType rtype)
 Return the enum value associated to the operator. More...
 
PGDLLEXPORT Datum Tnumber_sel (PG_FUNCTION_ARGS)
 Estimate the selectivity value of the operators for temporal numbers. More...
 
float8 tnumber_sel_default (meosOper operator)
 Return a default selectivity estimate for the operator when we don't have statistics or cannot use them for some reason. More...
 
Selectivity tnumber_sel_span_period (VariableStatData *vardata, Span *span, Span *period, meosOper oper)
 Return an estimate of the selectivity of the temporal search box and the operator for columns of temporal numbers. More...
 
static bool tpoint_const_to_stbox (Node *other, STBox *box)
 Transform the constant into an STBox. More...
 
PGDLLEXPORT Datum Tpoint_joinsel (PG_FUNCTION_ARGS)
 Estimate the join selectivity value of the operators for temporal points. More...
 
static bool tpoint_joinsel_components (meosOper oper, meosType oprleft, meosType oprright, bool *space, bool *time)
 Depending on the operator and the arguments, determine wheter the space, the time, or both components are taken into account for computing the join selectivity. More...
 
static float8 tpoint_joinsel_default (meosOper oper)
 Return a default join selectivity estimate for a given operator, when we don't have statistics or cannot use them for some reason. More...
 
static bool tpoint_oper_sel (Oid operid, meosType ltype, meosType rtype)
 Get the enum value associated to the operator. More...
 
PGDLLEXPORT Datum Tpoint_sel (PG_FUNCTION_ARGS)
 Estimate the restriction selectivity of the operators for temporal points. More...
 
static float8 tpoint_sel_default (meosOper oper)
 Return a default restriction selectivity estimate for a given operator, when we don't have statistics or cannot use them for some reason. More...