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

Fix API of first and count functions #1177

Closed
st-pasha opened this issue Jul 18, 2018 · 0 comments · Fixed by #1213
Closed

Fix API of first and count functions #1177

st-pasha opened this issue Jul 18, 2018 · 0 comments · Fixed by #1213
Assignees
Labels
improve Improvement of an existing functionality test Add new tests, or fix existing tests
Milestone

Comments

@st-pasha
Copy link
Contributor

st-pasha commented Jul 18, 2018

Currently both functions are defined as first(iterable, start=0) and count(iterable, start=0). The following fixes are needed:

  • Parameter start is not used in these functions -- remove
  • When iterable is not a BaseExpr they do nothing. However, it makes sense to define these functions for an arbitrary python iterable too - as the name of the parameter suggests.
  • The iterable in count() should default to None, so that count() is valid too. This should return a special BaseExpr that computes the number of rows in each group.

In addition, we need to add tests for both of these functions.

@st-pasha st-pasha added improve Improvement of an existing functionality test Add new tests, or fix existing tests labels Jul 18, 2018
@st-pasha st-pasha mentioned this issue Jul 18, 2018
@st-pasha st-pasha added this to the Release 0.7.0 milestone Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve Improvement of an existing functionality test Add new tests, or fix existing tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants