jonkeane commented on pull request #11652: URL: https://github.com/apache/arrow/pull/11652#issuecomment-964615083
> Floor division by 0L results in the max integer value rather than NA. This is, I think, because it's how cast (even with safe = TRUE) to integer from Inf. That is perhaps a different issue than this one? Yes, this sounds like a different issue — we should see if there's a Jira for this already in C++ or make one — we might not be able to solve this in a way that totally lines up with R, but this is certainly an improvement! > There's some tests for floor division for arrays outside a dplyr verb that appear to be using a completely different translation logic. I didn't update those tests or that logic because it seemed like a different issue to me (maybe needs to implement the Math and/or Ops group generics or more S3 methods for the array class?). There's not a (good) reason that these two logics are different. If we can find a way to unify them that would be great (though we can also defer that unification if we want). Though it would be totally fine to copy/paste the implementation (and change the tests) here too. For a bit of context: I don't think many people are using Math/Ops on arrays (as opposed to using our dplyr bindings), though IIRC these arithmetic functions were implemented for Arrays before we had dplyr mutate/transmute so they helped us flesh out some of the oddities in C++ compute, and no real reason to take them away now. -- 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]
