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 Error message when calling aggregation method on dataframe without any columns #1583

Closed
samster25 opened this issue Nov 8, 2023 · 1 comment · Fixed by #1587
Closed
Labels
good first issue Good for newcomers

Comments

@samster25
Copy link
Member

Currently when run an aggregation function on a dataframe without input columns:

df = daft.from_pydict({"x": [1,2,3]})
df.count()

we get the following error message, which is not very helpful.

AssertionError: no columns were passed in

We should instead:

  1. run the aggregation on all columns
  2. give a better error that give an example
  3. tell the user to look for df.count_rows() instead.
@samster25 samster25 changed the title Improve Error message when calling aggregation method on dataframe without any columsn Improve Error message when calling aggregation method on dataframe without any columns Nov 8, 2023
@colin-ho
Copy link
Contributor

colin-ho commented Nov 9, 2023

I can take this!

jaychia pushed a commit that referenced this issue Nov 13, 2023
…taframe without input columns (#1587)

Fixes #1583.

When a user does not specify columns in df aggregation methods, e.g.
`df.count()`:
- Default to running aggregation on all columns
- Log warning messages with an example to pass in columns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
2 participants