You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++][Compute] Add floor, ceiling, and truncate kernels #28487
Eduardo Ponce / @edponce: @ianmcook why would ceiling/floor spec be to not return integral values? By definition their result is an integral value, and R and SQL both return an integer type. On the other hand, numpy returns float64.
Ian Cook / @ianmcook: @edponce I believe that is incorrect; R's ceiling and floor functions return numeric vectors (R's double type). In most SQL engines I've looked at, the ceil and floor functions return a column with the same type as the input.
Eduardo Ponce / @edponce:
You are correct, I ran examples and R returns "double" type, and SQL engines match output to numeric type of input. I have no objection against this, and now recognize that my doubt arose from mixing the mathematical definition of an integral value with the type system of computing tools. Thanks!
Activity
asfimport commentedon May 19, 2021
Eduardo Ponce / @edponce:
These are special cases of the round kernels (ARROW-12744) or viceversa.
asfimport commentedon Jun 15, 2021
Eduardo Ponce / @edponce:
@ianmcook why would ceiling/floor spec be to not return integral values? By definition their result is an integral value, and R and SQL both return an integer type. On the other hand, numpy returns
float64.asfimport commentedon Jun 15, 2021
Ian Cook / @ianmcook:
@edponce I believe that is incorrect; R's
ceilingandfloorfunctions returnnumericvectors (R'sdoubletype). In most SQL engines I've looked at, theceilandfloorfunctions return a column with the same type as the input.asfimport commentedon Jun 15, 2021
Eduardo Ponce / @edponce:
You are correct, I ran examples and R returns "double" type, and SQL engines match output to numeric type of input. I have no objection against this, and now recognize that my doubt arose from mixing the mathematical definition of an integral value with the type system of computing tools. Thanks!
asfimport commentedon Jul 16, 2021
David Li / @lidavidm:
Issue resolved by pull request 10727
#10727