You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2023/07/02 09:35:17 UTC

[GitHub] [arrow-rs] Dandandan opened a new issue, #4476: Support partitioning functionality

Dandandan opened a new issue, #4476:
URL: https://github.com/apache/arrow-rs/issues/4476

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for this feature, in addition to  the *what*)
   -->
   
   In DataFusion, a common operation is to repartition a RecordBatch by hashing one or more columns and dividing them into `partition` record batches using the "formula" `hash % num_partitions`.
   
   The current approach is to create the indices that match and use them to `take` the individual arrays (see `BatchPartitioner` in datafusion).
   
   This is relatively expensive however, as we visit the arrays `num_partitions` times in different places, leading to cache inefficient.
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   I would like to have a method in arrow-rs that takes an Array with `partition` numbers (0..) and spreads the rows of the Array(s) into a `Vec<Array>` and/or `Vec<RecordBatch>`.
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


-- 
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.apache.org

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


[GitHub] [arrow-rs] Dandandan commented on issue #4476: Support partitioning functionality

Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on issue #4476:
URL: https://github.com/apache/arrow-rs/issues/4476#issuecomment-1616638630

   Yeah agree, we'll have to benchmark it.
   
   I expect though that write locality won't be as bad as the current read locality...


-- 
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-rs] richox commented on issue #4476: Support partitioning functionality

Posted by "richox (via GitHub)" <gi...@apache.org>.
richox commented on issue #4476:
URL: https://github.com/apache/arrow-rs/issues/4476#issuecomment-1623466353

   it is better to take multiple input arrays than a single array? it makes many small fragment arrays (which has less performance and wastes a lot of memory) if the number of partitions is big.


-- 
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-rs] tustvold commented on issue #4476: Support partitioning functionality

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #4476:
URL: https://github.com/apache/arrow-rs/issues/4476#issuecomment-1616626627

   Makes sense to me, of course assuming it empirically shows a performance improvement over using take. It occurs this would trade write locality for read locality, which may not be beneficial.


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