rmnskb commented on PR #48085:
URL: https://github.com/apache/arrow/pull/48085#issuecomment-3746658841

   > The `&` / `|` operators are currently mapped to the bitwise kernels, but 
in array-land, I think the most common use case for those is actually for 
logical (boolean) operations. So as a user, I would expect those to also work 
on bool type.
   
   That is true, I also though about it, but it seems to me that being 
consistent with other dunders also makes sense. Should we probably document 
this? So the users know what to expect.
    
   > Do we want to add the round/floor/ceil/trunc rounding dunders? Numpy does 
not support those, so here I wouldn't have expected them. But maybe it can also 
be useful (I think it find it a bit strange looking that a stdlib builtin 
function returns a pyarrow array, but that is probably a question of getting 
used to it). One difference is that the builtin is documented to return an int, 
and our kernels don't do that (float stays float)
   
   Fair point. I think documenting the expected behavior might be a good idea 
given that Python is quite forgiving when it comes to data types. What do you 
think? The other option is to explicitly convert the output of this dunders to 
integers to stay consistent with the builtin docs.
   


-- 
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]

Reply via email to