Documentation ¶
Overview ¶
Package group represents group stage of analysis. Group stage group values from expand stage. The values are grouped under the same name and type (result: [name, type] => value aggregation). This stage counts all statistics above the data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BsonFieldName string
BsonFieldName represents field name
var LengthHistogramTypes = []string{
"string",
"array",
"object",
}
LengthHistogramTypes - types for which a histogram is created from the lengths. if LengthHistogramResolution > 0
var StoreAvgValueTypes = []string{
"double",
"bool",
"int",
"long",
"decimal",
}
StoreAvgValueTypes - types for which the average value is calculated and stored, if options.StoreMinMaxAvgValue == true
var StoreBottomValuesTypes = []string{
"double",
"string",
"date",
"int",
"timestamp",
"long",
"decimal",
}
StoreBottomValuesTypes - types for which are saved least occurring value, if options.StoreBottomNValues > 0
var StoreCountOfUniqueTypes = []string{
"double",
"string",
"date",
"int",
"timestamp",
"long",
"decimal",
}
StoreCountOfUniqueTypes - types for which is stored number of unique values if options.StoreCountOfUnique == true
var StoreLengthTypes = []string{
"string",
"array",
"object",
}
StoreLengthTypes - types for which the minimum, maximum, and average values are stored, if options.StoreMinMaxAvgLength == true
var StoreMinMaxValueTypes = []string{
"objectId",
"double",
"string",
"bool",
"date",
"int",
"timestamp",
"long",
"decimal",
}
StoreMinMaxValueTypes - Types for which the minimum and maximum values are calculated and stored, if options.StoreMinMaxAvgValue == true
var StoreTopValuesTypes = []string{
"double",
"string",
"date",
"int",
"timestamp",
"long",
"decimal",
}
StoreTopValuesTypes - types for which are saved most occurring value, if options.StoreTopNValues > 0
var StoreValueTypes []string
StoreValueTypes - types for which is calculated frequency distribution of value.
var TopBottomValuesTypes []string
TopBottomValuesTypes = STORE_TOP_VALUES_TYPES + STORE_BOTTOM_VALUES_TYPES
var ValueHistogramTypes = []string{
"double",
"date",
"int",
"long",
"decimal",
}
ValueHistogramTypes - types for which a histogram is created from the values. if ValueHistogramResolution > 0
Functions ¶
func NormalizeType ¶
NormalizeType normalizes data from the database.
func ResultChannelToSlice ¶
func ResultChannelToSlice(ch <-chan Result) []interface{}
ResultChannelToSlice reads Result channel into slice.
Types ¶
type Options ¶
type Options struct { ProcessObjectIdAsDate bool // objectId will be converted to date and analysis //MaxItemsForFreqAnalysis uint // for the frequency analysis (unique, top, bottom), the first N samples will be used, zero = all items StoreMinMaxAvgValue bool // store minimum, maximum and average value if possible StoreMinMaxAvgLength bool // store minimum, maximum and average length StoreCountOfUnique bool // store number of unique values StoreTopNValues uint // saves the N values that most occur, zero = disabled StoreBottomNValues uint // saves the N values that least occur, zero = disabled StoreWeekdayHistogram bool StoreHourHistogram bool ValueHistogramMaxRes uint // create histogram from values, zero = disabled LengthHistogramMaxRes uint // create histogram from length of values, zero = disabled }
Options for group stage.
func (*Options) IsNecessaryToCalcLengthFreq ¶
IsNecessaryToCalcLengthFreq - will be length frequency distribution needed for further calculations?
func (*Options) IsNecessaryToCalcValueFreq ¶
IsNecessaryToCalcValueFreq - will be value frequency distribution needed for further calculations?
type StageFactory ¶
StageFactory prototype.
Directories ¶
Path | Synopsis |
---|---|
Package groupInDB is the implementation of the group stage that runs in database.
|
Package groupInDB is the implementation of the group stage that runs in database. |
Package groupLocally is the implementation of the group stage that runs locally.
|
Package groupLocally is the implementation of the group stage that runs locally. |
Package groupTests contains common tests for group stage.
|
Package groupTests contains common tests for group stage. |