|
|
@ -46,6 +46,9 @@ type mergeGenericQuerier struct { |
|
|
|
//
|
|
|
|
//
|
|
|
|
// In case of overlaps between the data given by primaries' and secondaries' Selects, merge function will be used.
|
|
|
|
// In case of overlaps between the data given by primaries' and secondaries' Selects, merge function will be used.
|
|
|
|
func NewMergeQuerier(primaries, secondaries []Querier, mergeFn VerticalSeriesMergeFunc) Querier { |
|
|
|
func NewMergeQuerier(primaries, secondaries []Querier, mergeFn VerticalSeriesMergeFunc) Querier { |
|
|
|
|
|
|
|
if len(primaries)+len(secondaries) == 0 { |
|
|
|
|
|
|
|
return NoopQuerier() |
|
|
|
|
|
|
|
} |
|
|
|
queriers := make([]genericQuerier, 0, len(primaries)+len(secondaries)) |
|
|
|
queriers := make([]genericQuerier, 0, len(primaries)+len(secondaries)) |
|
|
|
for _, q := range primaries { |
|
|
|
for _, q := range primaries { |
|
|
|
if _, ok := q.(noopQuerier); !ok && q != nil { |
|
|
|
if _, ok := q.(noopQuerier); !ok && q != nil { |
|
|
|