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

remove precondition on aggregate such that empty slices are allowed #795

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

emillynge
Copy link
Contributor

Thanks for contributing.

Description

A precondition was removed from tech.tablesaw.table.TableSliceGroup.aggregate(ListMultimap<String, AggregateFunction<?, ?>> functions) such that the method no longer throws an IllegalArgumentException when the table is empty.

This PR has also been discussed in #785

Testing

A unit test is included that makes sure that aggregations on an empty table can be done, that the resulting table is also empty and that the table has the expected number of columns.

See tech.tablesaw.table.TableSliceGroupTest.aggregateWithEmptyResult()

@benmccann benmccann merged commit 7337d26 into jtablesaw:master Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants