brimdata / zed

A novel data lake based on super-structured data
https://zed.brimdata.io/
BSD 3-Clause "New" or "Revised" License
1.37k stars 67 forks source link

integer reducer coercions #1506

Open mccanne opened 3 years ago

mccanne commented 3 years ago

The integer math reducers currently coerce any input to 64-bit. This logic should use the same coercion rules as expr/coerce.go and we should clarify this in the documentation.

henridf commented 3 years ago

This logic should also preserve commutativity of the underlying operation. If the same values are fed in a different order (to min/max/sum/avg), the output resulting value and type should be the same.