alamb opened a new pull request #538:
URL: https://github.com/apache/arrow-datafusion/pull/538


    # Rationale for this change
   The body of RepartitionExec::execute is long and highly indented, and has a 
bunch of metrics related code that obscures how it works, in my opinion. 
   
   # What changes are included in this PR?
   
   As suggested by @tustvold  in 
https://github.com/apache/arrow-datafusion/pull/521#discussion_r646611109, 
attempt to make the code clearer and error conditions easier to reason about by:
   
   Changes:
   1. Factor the body of the repartition into its own async function
   2. Grouped the metrics into a `RepartitionMetrics` struct for convenience
   3. Refactored repeated code into `SQLMetric::add_elapsed` and reduced 
duplication
   
   I still think the metrics could still be made better, and I hope to work on 
that at a later date.
   
   
   
   # Are there any user-facing changes?
   No
   
   


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

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


Reply via email to