8000 docs: tweak explanation of median for even cardinality inputs by NickCrews · Pull Request #13726 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs: tweak explanation of median for even cardinality inputs #13726

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

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

NickCrews
Copy link
Contributor
@NickCrews NickCrews commented Sep 4, 2024

Instead of qualitative/quantitative, I think we should be more direct and list the actual types.

Also, just a little more word-smithing to be explicit that we are only referring to the two middle values. This change I am less convinced is a good idea, but I still think it's a positive.

Related to #13655

@Mytherin
Copy link
Collaborator
Mytherin commented Sep 4, 2024

Thanks for the PR!

However - this description is not quite correct. The split is not VARCHAR and not-VARCHAR, since DuckDB supports computing the median over any type, including nested types.

For example:

D select median({'my_nested_type': i}) from range(0,10) t(i);
┌───────────────────────────────────────────────┐
│ median(main.struct_pack(my_nested_type := i)) │
│         struct(my_nested_type bigint)         │
├───────────────────────────────────────────────┤
│ {'my_nested_type': 4}                         │
└───────────────────────────────────────────────┘

Types that interpolate are numeric types and date/time types. Other types (VARCHAR, nested types, JSON, INTERVAL) do not interpolate and select one of the two elements instead.

@NickCrews
Copy link
Contributor Author

ahh, yes, that makes sense. Can I phrase it just as you did? (numeric, date, and time vs everything else). Maybe it's just me that is getting confused by the quantitative/qualitative, but I'd rather be verbose and explicit over succinct but possibly confusing. But this is just a value judgement, so I'm happy to keep it as is if you like it better.

Copy link
github-actions bot commented Dec 4, 2024

This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale label Dec 4, 2024
@duckdb-draftbot duckdb-draftbot marked th 8000 is pull request as draft December 5, 2024 00:48
@NickCrews
Copy link
Contributor Author

@Mytherin I made some adjustments based on your feedback, this is ready for another review when you get the chance. Thanks!

@NickCrews NickCrews marked this pull request as ready for review December 5, 2024 00:49
@Mytherin
Copy link
Collaborator
Mytherin commented Dec 5, 2024

Thanks - the changeset is fine by me but the CI is failing. Can you run the formatter?

@github-actions github-actions bot removed the stale label Dec 6, 2024
Instead of qualitative/quantitative, I think we should be more direct and say the actual types

Also, just a little more word-smithing to be explicit that we are only referring to the two middle values. This change I am less convinced is a good idea, but I still think it's a positive.

Related to duckdb#13655
@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 6, 2024 09:19
@NickCrews NickCrews marked this pull request as ready for review December 6, 2024 12:21
@NickCrews
Copy link
Contributor Author

@Mytherin I ran the formatter, now CI is happy, I think this is good to merge if you are still happy with it. Thanks!

@Mytherin Mytherin merged commit cd0d0da into duckdb:main Feb 21, 2025
44 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

Antonov548 added a commit to Antonov548/duckdb-r that referenced this pull request Mar 4, 2025
docs: tweak explanation of median for even cardinality inputs (duckdb/duckdb#13726)
Linux CLI: override platform for ARM manylinux (duckdb/duckdb#16347)
[chore] No ccache for OSX Python (duckdb/duckdb#16348)
Add missing include (duckdb/duckdb#16342)
krlmlr pushed a commit to duckdb/duckdb-r that referenced this pull request Mar 5, 2025
docs: tweak explanation of median for even cardinality inputs (duckdb/duckdb#13726)
Linux CLI: override platform for ARM manylinux (duckdb/duckdb#16347)
[chore] No ccache for OSX Python (duckdb/duckdb#16348)
Add missing include (duckdb/duckdb#16342)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 15, 2025
docs: tweak explanation of median for even cardinality inputs (duckdb/duckdb#13726)
Linux CLI: override platform for ARM manylinux (duckdb/duckdb#16347)
[chore] No ccache for OSX Python (duckdb/duckdb#16348)
Add missing include (duckdb/duckdb#16342)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 15, 2025
docs: tweak explanation of median for even cardinality inputs (duckdb/duckdb#13726)
Linux CLI: override platform for ARM manylinux (duckdb/duckdb#16347)
[chore] No ccache for OSX Python (duckdb/duckdb#16348)
Add missing include (duckdb/duckdb#16342)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 17, 2025
docs: tweak explanation of median for even cardinality inputs (duckdb/duckdb#13726)
Linux CLI: override platform for ARM manylinux (duckdb/duckdb#16347)
[chore] No ccache for OSX Python (duckdb/duckdb#16348)
Add missing include (duckdb/duckdb#16342)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 18, 2025
docs: tweak explanation of median for even cardinality inputs (duckdb/duckdb#13726)
Linux CLI: override platform for ARM manylinux (duckdb/duckdb#16347)
[chore] No ccache for OSX Python (duckdb/duckdb#16348)
Add missing include (duckdb/duckdb#16342)
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
0