Documentation
¶
Overview ¶
Package groupInDB is the implementation of the group stage that runs in database.
Index ¶
- func BaseComputation(options *group.Options) *expr.Pipeline
- func ComputeStats(p *expr.Pipeline, groupOptions *group.Options, ...)
- func ConvertDateToTimezone(date interface{}, location *time.Location) interface{}
- func DateHourHistogram(location *time.Location) *expr.Pipeline
- func DateWeekdayHistogram(location *time.Location) *expr.Pipeline
- func GroupStats(p *expr.Pipeline, groupOptions *group.Options)
- func GroupValues(p *expr.Pipeline, options *group.Options)
- func LengthExtremesComputation(options *group.Options) *expr.Pipeline
- func LengthsHistogram(options *group.Options) *expr.Pipeline
- func NewStage(groupOptions *group.Options) *analysis.Stage
- func ValueExtremesComputation(options *group.Options) *expr.Pipeline
- func ValueFreqComputation(options *group.Options) *expr.Pipeline
- func ValuesHistogram(options *group.Options) *expr.Pipeline
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseComputation ¶
BaseComputation generates operations for compute base statistics. Example results:
[
{
ID: {
FIELD_NAME: "name"
FIELD_TYPE: "string",
STAT_TYPE: BASE_STATS,
}
COUNT: 5
...
},
...
]
func ComputeStats ¶
ComputeStats generates pipeline that compute stats of values and lengths. Example results:
[
{
ID: {
FIELD_NAME: "name"
FIELD_TYPE: "string",
STAT_TYPE: BASE_STATS,
}
COUNT: 5
...
},
...
]
func ConvertDateToTimezone ¶
ConvertDateToTimezone converts date to desired timezone
func DateHourHistogram ¶
DateHourHistogram returns hour histogram histogram calculation pipeline.
func DateWeekdayHistogram ¶
DateWeekdayHistogram returns weekday histogram calculation pipeline.
func GroupStats ¶
GroupStats computes stats of values and lengths. Example results:
[
{
FIELD_NAME: "name"
FIELD_TYPE: "string",
COUNT: 5
VALUE_HISTOGRAM: ...
...
},
...
]
func GroupValues ¶
GroupValues from expand stage by name and type. Example results:
[
{
FIELD_NAME: "name"
FIELD_TYPE: "string",
ALL_VALUES: [
{
VALUE: "Michael",
LENGTH: 7,
},
{
VALUE: "Mike",
LENGTH: 4,
},
...
]
},
...
]
func LengthExtremesComputation ¶
LengthExtremesComputation adds length extremes computation to aggregation pipeline Example results:
[
{
ID: {
FIELD_NAME: "name"
FIELD_TYPE: "string",
STAT_TYPE: LENGTH_EXTREMES,
}
MIN_LENGTH: 2,
MAX_LENGTH: 5,
AVG_LENGTH: 2.45,
...
},
...
]
func LengthsHistogram ¶
LengthsHistogram adds lengths histogram calculation to aggregation pipeline.
func ValueExtremesComputation ¶
ValueExtremesComputation generates pipeline to compute min, max and avg value. Example results:
[
{
ID: {
FIELD_NAME: "name"
FIELD_TYPE: "string",
STAT_TYPE: VALUE_EXTREMES,
}
MIN_VALUE: "abc",
MAX_VALUE: "NKLXYZ",
AVG_VALUE: nil,
...
},
...
]
func ValueFreqComputation ¶
ValueFreqComputation generates pipeline that compute most and least frequent values. Example results:
[
{
ID: {
FIELD_NAME: "name"
FIELD_TYPE: "string",
STAT_TYPE: VALUE_FREQ_STATS,
}
COUNT_UNIQUE: 4,
TOP_N_VALUES: ...
BOTTOM_N_VALUES: ...
},
...
]
func ValuesHistogram ¶
ValuesHistogram returns lengths histogram calculation pipeline.
Types ¶
This section is empty.