32 #ifndef __TPOINT_ANALYZE_H__ 33 #define __TPOINT_ANALYZE_H__ 37 #include <catalog/pg_type.h> 38 #include <commands/vacuum.h> 39 #include <liblwgeom.h> 121 int sample_rows,
double total_rows,
int mode);
struct ND_BOX_T ND_BOX
N-dimensional box type for calculations, to avoid doing explicit axis conversions from GBOX in all ca...
#define ND_DIMS
The maximum number of dimensions our code can handle.
Definition: tpoint_analyze.h:48
float4 cells_covered
Definition: tpoint_analyze.h:105
float4 not_null_features
Definition: tpoint_analyze.h:94
float4 sample_features
Definition: tpoint_analyze.h:91
float4 histogram_cells
Definition: tpoint_analyze.h:100
void nd_box_from_gbox(const GBOX *gbox, ND_BOX *nd_box)
Set the values of an ND_BOX from a GBOX.
Definition: tpoint_analyze.c:281
struct ND_IBOX_T ND_IBOX
N-dimensional box index type.
ND_BOX extent
Definition: tpoint_analyze.h:85
int nd_box_overlap(const ND_STATS *nd_stats, const ND_BOX *nd_box, ND_IBOX *nd_ibox)
What stats cells overlap with this ND_BOX? Put the lowest cell addresses in ND_IBOX->min and the high...
Definition: tpoint_analyze.c:194
int nd_box_merge(const ND_BOX *source, ND_BOX *target)
Expand the bounds of target to include source.
Definition: tpoint_analyze.c:178
int nd_box_intersects(const ND_BOX *a, const ND_BOX *b, int ndims)
Returns true if ND_BOX a overlaps b, false otherwise.
Definition: tpoint_analyze.c:224
N-dimensional box index type.
Definition: tpoint_analyze.h:64
float4 table_features
Definition: tpoint_analyze.h:88
float4 histogram_features
Definition: tpoint_analyze.h:97
void gserialized_compute_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, int sample_rows, double total_rows, int mode)
The gserialized_analyze_nd sets this function as a callback on the stats object when called by the AN...
Definition: tpoint_analyze.c:514
float4 max[ND_DIMS]
Definition: tpoint_analyze.h:58
int nd_box_init(ND_BOX *a)
Zero out an ND_BOX.
Definition: tpoint_analyze.c:138
double nd_box_ratio_overlaps(const ND_BOX *b1, const ND_BOX *b2, int ndims)
Returns the proportion of b2 that is covered by b1.
Definition: tpoint_analyze.c:239
int nd_box_init_bounds(ND_BOX *a)
Prepare an ND_BOX for bounds calculation: set the maxes to the smallest thing possible and the mins t...
Definition: tpoint_analyze.c:150
float4 min[ND_DIMS]
Definition: tpoint_analyze.h:57
float4 ndims
Definition: tpoint_analyze.h:79
N-dimensional statistics structure.
Definition: tpoint_analyze.h:76
Datum tpoint_analyze(PG_FUNCTION_ARGS)
Compute the statistics for temporal point columns.
Definition: tpoint_analyze.c:1083
struct ND_STATS_T ND_STATS
N-dimensional statistics structure.
N-dimensional box type for calculations, to avoid doing explicit axis conversions from GBOX in all ca...
Definition: tpoint_analyze.h:55
int nd_increment(ND_IBOX *ibox, int ndims, int *counter)
Given an n-d index array (counter), and a domain to increment it in (ibox) increment it by one...
Definition: tpoint_analyze.c:328