promql/engine.go
func (ev *evaluator) evalSubquery(subq *SubqueryExpr) *MatrixSelector {
	val := ev.eval(subq).(Matrix)
	ms := &MatrixSelector{
		Range:  subq.Range,
		Offset: subq.Offset,
		series: make([]storage.Series, 0, len(val)),
	}
	for _, s := range val {
		ms.series = append(ms.series, NewStorageSeries(s))
	}
	return ms
}
func (ev *evaluator) evalSubquery(subq *SubqueryExpr) *MatrixSelector {
	val := ev.eval(subq).(Matrix)
	ms := &MatrixSelector{
		Range:  subq.Range,
		Offset: subq.Offset,
		series: make([]storage.Series, 0, len(val)),
	}
	for _, s := range val {
		ms.series = append(ms.series, NewStorageSeries(s))
	}
	return ms
}
// evalSubquery evaluates given SubqueryExpr and returns an equivalent
// evaluated MatrixSelector in its place. Note that the Name and LabelMatchers are not set.