mapleFU commented on PR #37060:
URL: https://github.com/apache/arrow/pull/37060#issuecomment-1698439488
> There's no special handling of them. So they are dealt with the same way
C++ deals with them.
```c++
TEST(TestRollingProd, ZeroHandling) {
for (std::string func : {"rolling_prod", "rolling_prod_checked"}) {
for (auto ty : NumericTypes()) {
if (ty == uint8() || ty == int8()) { // out of bounds
continue;
}
RollingOptions options(/*window_length=*/3, 3, true);
CheckRolling(func, ArrayFromJSON(ty, "[1, 2, 0, 4, 5, 6, 10]"),
ArrayFromJSON(ty, "[1, 2, 0, 0, 0, 120, 300]"), &options);
}
}
}
```
Yeah, I mean when handling window with `0`, `NaN`. would "prod" suffer from
divide by zero / NaN when 0/NaN is moved from window?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]