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

Median aggregation fails if null values - inconsistent with other aggregation functions- linked to #4837 #5008

Open
2 tasks done
alex314159 opened this issue Jul 31, 2023 · 0 comments

Comments

@alex314159
Copy link

Describe the bug

As per the title, linked to #4837

The culprit is, I think:

 const values = leafRows.map(row => row.getValue(columnId))
  if (!isNumberArray(values)) {
    return
  }
  if (values.length === 1) {
    return values[0]
  }

Your minimal, reproducible example

any table

Steps to reproduce

Any grouped tables with aggregationFn "median" and some null values in the group

Expected behavior

I believe user would like to see the median of the existing values, just like sum / min / max

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

any but tested on Windows

react-table version

v8.9.4

TypeScript version

No response

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
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

No branches or pull requests

1 participant