-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order by/ Sort #174
Comments
(sort-merge join is not a language feature, but rather a rule in our eventual optimizer.) |
But somebody has to write the optimizer rule for that. This issue is for language support and optimizer support. |
It isn't clear whether this refers to ORDER BY (a language feature) or sort-merge join (an optimizer feature). These should be two separate issues. |
ORDER BY because we don't have a merge consumer in myria yet. |
Distributed merge can lead to deadlock for multiple producers/multiple consumers: see discussion in http://dl.acm.org/citation.cfm?id=152611. There are various workarounds discussed in that reference. |
We already have a global Merge consumer that can run on the coordinator, along with local MergeJoin and InMemoryOrderBy operators. We would need to push sorts down to Postgres for data that didn't fit in memory, but we may already have what we need to support |
We also need to implement a rewrite rule to decompose a global |
I totally don't remember writing uwescience/myria@555907f. Anyway, note that this is not a merge consumer! So it won't merge the inputs from children but only the inputs from different operators. |
Right, so you're saying we need a proper exchange operator for Merge? I'll open an issue for that, thanks! |
@bmyerz would appreciate feedback on adding a |
I'd prefer not to see a merge operator at the logical level. Is the use case here top k? That's a reasonable logical operator. In fact, I'd go further and claim logical order by is always unnecessary (SQL gets around that by using a separate order by clause specifically for On Monday, May 9, 2016, Tobin Baker notifications@github.com wrote:
|
@senderista I agree with Bill on this |
@billhowe @bmyerz OK, sounds like we just need a new Myria Also, can we go ahead and push logical |
@senderista Ya, we can do the local OrderBy (and insert a Merge so that the plan is consistent with logical OrderBy).
|
Something @mbalazin pointed out is that for top-k queries with small k, we can just run local top-k queries at each worker (possibly pushing them into Postgres), and sort the combined results in memory at the coordinator using the existing |
MyriaL should support sorting. We have support for sorted scans and an in memory order by. Later, we probably want a sort merge join.
The text was updated successfully, but these errors were encountered: