You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/09/09 09:17:13 UTC

[GitHub] [arrow] edponce opened a new pull request #11115: ARROW-12084: [C++][Compute] Add remainder and quotient compute::Function

edponce opened a new pull request #11115:
URL: https://github.com/apache/arrow/pull/11115


   This PR adds compute functions "divmod" and "divmod_checked" to calculate the quotient and remainder as a single operation.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] edponce commented on a change in pull request #11115: ARROW-12084: [C++][Compute] Add remainder and quotient compute::Function

Posted by GitBox <gi...@apache.org>.
edponce commented on a change in pull request #11115:
URL: https://github.com/apache/arrow/pull/11115#discussion_r714102633



##########
File path: cpp/src/arrow/compute/kernels/codegen_internal.h
##########
@@ -270,6 +275,24 @@ struct OutputArrayWriter<Type, enable_if_c_number_or_decimal<Type>> {
   }
 };
 
+template <typename Type>
+struct OutputArrayWriter<Type, enable_if_struct<Type>> {

Review comment:
       Thanks! I reached the same conclusion. I will try to provide support for struct-returning arithmetic functions.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #11115: ARROW-12084: [C++][Compute] Add remainder and quotient compute::Function

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #11115:
URL: https://github.com/apache/arrow/pull/11115#issuecomment-915911393


   https://issues.apache.org/jira/browse/ARROW-12084


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] edponce commented on pull request #11115: ARROW-12084: [C++][Compute] Add remainder and quotient compute::Function

Posted by GitBox <gi...@apache.org>.
edponce commented on pull request #11115:
URL: https://github.com/apache/arrow/pull/11115#issuecomment-924405984


   @lidavidm Please review :)
   
   FYI, PR is still missing tests.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] lidavidm commented on a change in pull request #11115: ARROW-12084: [C++][Compute] Add remainder and quotient compute::Function

Posted by GitBox <gi...@apache.org>.
lidavidm commented on a change in pull request #11115:
URL: https://github.com/apache/arrow/pull/11115#discussion_r713871305



##########
File path: cpp/src/arrow/compute/kernels/codegen_internal.h
##########
@@ -270,6 +275,24 @@ struct OutputArrayWriter<Type, enable_if_c_number_or_decimal<Type>> {
   }
 };
 
+template <typename Type>
+struct OutputArrayWriter<Type, enable_if_struct<Type>> {

Review comment:
       Hmm, I'm frankly not sure that any of this works. A Struct array isn't an array of Struct scalars, it's a nested array with one child for each struct field. For instance, there isn't a buffer 1 in a struct array at all, only a validity bitmap. This might still be made to work but it would have a lot of indirections around wrapping/unwrapping scalars. It might be better to specialize DivMod or consider a separate pattern for struct-returning arithmetic functions.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org