Previously, the binop_identity function in code generation initialized both signed and unsigned integers were initialized with ::std::u32/64::MIN/MAX for max and min respectively; however, this is an incorrect initialization value for signed (e.g., i64) values.
For example, finding the min of [1, 2, 3, 4, 5] with an initial builder value of ::std::u64::MAX would cause the value in the builder to be -1, resulting an an incorrect result. This patch fixes this issue.
Previously, the
binop_identity
function in code generation initialized both signed and unsigned integers were initialized with::std::u32/64::MIN/MAX
formax
andmin
respectively; however, this is an incorrect initialization value for signed (e.g.,i64
) values.For example, finding the min of
[1, 2, 3, 4, 5]
with an initial builder value of::std::u64::MAX
would cause the value in the builder to be-1
, resulting an an incorrect result. This patch fixes this issue.