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

[GitHub] [arrow-datafusion] alamb opened a new issue, #7023: Improved performance for streaming group by

alamb opened a new issue, #7023:
URL: https://github.com/apache/arrow-datafusion/issues/7023

   ### Is your feature request related to a problem or challenge?
   
   During review of https://github.com/apache/arrow-datafusion/pull/6932 there were several suggstions made about how we could improve the performance of streaming / bounded grouping (when the data is sorted by some/all of the group keys)
   
   This ticket tracks those improvements
   
   
   ### Describe the solution you'd like
   
   
   # Suggestion 1
   @tustvold  suggests on https://github.com/apache/arrow-datafusion/pull/6932#r1267305736
   
   > It occurs to me that a potentially faster way to detect the group boundaries would be to use the inequality kernel offset by one w.r.t to each other, ORing the results together, and then iterating over the set bits.
   > 
   > There would be some subtlety to handle nulls correctly, but it would likely be significantly faster and would not require converting to the row format
   >
   > We could likely do something similar for window functions if we aren't already
   
   Note that IOx does something similar to compute partition boundaries here: https://github.com/influxdata/influxdb_iox/blob/d3b3805e5fa87214ea934427df3967a57a14669c/iox_query/src/provider/deduplicate/algo.rs#L101-L207
   
   # Suggestion 2
   From https://github.com/apache/arrow-datafusion/pull/6932#r1267344573
   
   > In the case of GroupOrderingFull it seems unnecessary to be computing hashes at all, we can just group based on whenever the sort key changes?
   
   This could likely go quite a bit faster as hashing is a significant part of the time
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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


Re: [I] Improved performance for streaming group by [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7023:
URL: https://github.com/apache/datafusion/issues/7023#issuecomment-2282790660

   Thanks @smiklos  -- done!


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


[GitHub] [arrow-datafusion] tustvold commented on issue #7023: Improved performance for streaming group by

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

   I implemented suggestion 1 upstream in https://github.com/apache/arrow-rs/pull/4575


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


Re: [I] Improved performance for streaming group by [datafusion]

Posted by "smiklos (via GitHub)" <gi...@apache.org>.
smiklos commented on issue #7023:
URL: https://github.com/apache/datafusion/issues/7023#issuecomment-2282785590

   @alamb I think this issue can be closed. Suggestion 1 is done, suggestion 2 is no longer relevant as there are no hashes computed for GroupOrderingFull


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Improved performance for streaming group by [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #7023: Improved performance for streaming group by 
URL: https://github.com/apache/datafusion/issues/7023


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org