@@ -121,10 +121,10 @@ func undefinedHistogramOp(_ context.Context, _ *histogram.FloatHistogram, _ floa
121121
122122var lhsHistogramOperations = map [string ]histogramFloatOperation {
123123 "*" : func (ctx context.Context , hist * histogram.FloatHistogram , float float64 ) * histogram.FloatHistogram {
124- return hist .Copy ().Mul (float )
124+ return hist .Copy ().Mul (float ). Compact ( 0 )
125125 },
126126 "/" : func (ctx context.Context , hist * histogram.FloatHistogram , float float64 ) * histogram.FloatHistogram {
127- return hist .Copy ().Div (float )
127+ return hist .Copy ().Div (float ). Compact ( 0 )
128128 },
129129 "+" : func (ctx context.Context , hist * histogram.FloatHistogram , float float64 ) * histogram.FloatHistogram {
130130 warnings .AddToContext (annotations .NewIncompatibleTypesInBinOpInfo ("histogram" , "+" , "float" , posrange.PositionRange {}), ctx )
@@ -174,7 +174,7 @@ var lhsHistogramOperations = map[string]histogramFloatOperation{
174174
175175var rhsHistogramOperations = map [string ]histogramFloatOperation {
176176 "*" : func (ctx context.Context , hist * histogram.FloatHistogram , float float64 ) * histogram.FloatHistogram {
177- return hist .Copy ().Mul (float )
177+ return hist .Copy ().Mul (float ). Compact ( 0 )
178178 },
179179 "+" : func (ctx context.Context , hist * histogram.FloatHistogram , float float64 ) * histogram.FloatHistogram {
180180 warnings .AddToContext (annotations .NewIncompatibleTypesInBinOpInfo ("float" , "+" , "histogram" , posrange.PositionRange {}), ctx )
0 commit comments