Skip to content
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

Improve usability and docs for UpdateBy #2659

Merged
merged 11 commits into from
Jul 21, 2022

Conversation

lbooker42
Copy link
Contributor

@lbooker42 lbooker42 commented Jul 21, 2022

After this change should be able to call updateBy without needing explicit imports. Some examples:

import io.deephaven.api.updateby.UpdateByClause;
import static io.deephaven.api.updateby.UpdateByClause.*;

cumulative_sum=emptyTable(10).update("RowNum=ii").updateBy(UpdateByClause.of(CumSum("RowNumSum=RowNum")))

cumulative_sum_grouped=emptyTable(10).update("RowNum=ii", "Group=RowNum%3").updateBy(UpdateByClause.of(CumSum("RowNumSum=RowNum")), "Group")

cumulative_multi_grouped=emptyTable(10).update("RowNum=ii", "Group=RowNum%3").updateBy([UpdateByClause.of(CumSum("RowNumSum=RowNum")), UpdateByClause.of(CumMin("RowNumMin=RowNum"))], "Group")

can be written as

cumulative_sum=emptyTable(10).update("RowNum=ii").updateBy(CumSum("RowNumSum=RowNum"))

cumulative_sum_grouped=emptyTable(10).update("RowNum=ii", "Group=RowNum%3").updateBy(CumSum("RowNumSum=RowNum"), "Group")

cumulative_multi_grouped=emptyTable(10).update("RowNum=ii", "Group=RowNum%3").updateBy([CumSum("RowNumSum=RowNum")),CumMin("RowNumMin=RowNum")], "Group")

Closes #2647

rcaudy
rcaudy previously approved these changes Jul 21, 2022
rcaudy
rcaudy previously approved these changes Jul 21, 2022
@lbooker42 lbooker42 merged commit 46dc46d into deephaven:main Jul 21, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2022
@lbooker42 lbooker42 deleted the lab-updateby-docs branch June 26, 2024 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usability and docs for UpdateBy
2 participants