-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support topK using the DBSP operator #954
Conversation
Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
I will work on a commit to add more tests. |
* Apply a topK operation to each of the groups in an indexed collection. | ||
* This always sorts the elements of each group. | ||
* To sort the entire collection just group by (). | ||
* The function is a DBSPSortExpression used to compare two elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong, I will fix the comment in the next commit
Here is a sample output produced:
|
this.circuit.addOperator(integral); | ||
index = integral; | ||
} | ||
// Global sort. Implemented by aggregate in a single Vec<> which is then sorted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code is unchanged
Looks good, assuming it's all |
Right, have to handle descending. Easy. |
BTW, I think this is a user-visible change, which requires docs + a changelog entry. |
which part is visible? LIMIT was there in the grammar. |
Clearly, we're adding a new user-visible capability. |
No, we are fixing a bug |
So you're saying we're implementing a behavior that documentation already promised before. If the documentation is accurate, then we're good. A changelog entry documenting the bug fix is still in order. |
Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
import java.util.List; | ||
import java.util.Set; | ||
|
||
import static org.dbsp.sqlCompiler.ir.type.DBSPTypeCode.USER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was moved here from DBSPExecutor
Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
Is this a user-visible change (yes/no): no