promql/functions.go
func funcClampMin(vals []Value, args Expressions, enh *EvalNodeHelper) Vector {
	vec := vals[0].(Vector)
	min := vals[1].(Vector)[0].Point.V
	for _, el := range vec {
		enh.out = append(enh.out, Sample{
			Metric: enh.dropMetricName(el.Metric),
			Point:  Point{V: math.Max(min, el.V)},
		})
	}
	return enh.out
}
func funcClampMin(vals []Value, args Expressions, enh *EvalNodeHelper) Vector {
	vec := vals[0].(Vector)
	min := vals[1].(Vector)[0].Point.V
	for _, el := range vec {
		enh.out = append(enh.out, Sample{
			Metric: enh.dropMetricName(el.Metric),
			Point:  Point{V: math.Max(min, el.V)},
		})
	}
	return enh.out
}
func funcClampMin ( vals [ ] Value , args Expressions , enh * EvalNodeHelper ) Vector { vec := vals [ 0 ] . ( Vector ) min := vals [ 1 ] . ( Vector ) [ 0 ] . Point . V for _ , el := range vec { enh . out = append ( enh . out , Sample { Metric : enh . dropMetricName ( el . Metric ) , Point : Point { V : math . Max ( min , el . V ) } , } ) } return enh . out }
// === clamp_min(Vector ValueTypeVector, min Scalar) Vector ===
=== clamp_min ( Vector ValueTypeVector min Scalar ) Vector ===