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

Better split_out choice in groupby operations #1031

Open
phofl opened this issue Apr 17, 2024 · 0 comments
Open

Better split_out choice in groupby operations #1031

phofl opened this issue Apr 17, 2024 · 0 comments

Comments

@phofl
Copy link
Collaborator

phofl commented Apr 17, 2024

Currently, we set the default of split_out automatically based on the number of partitions to make the system more reliable and not squash everything into a single partition. This is not great for low cardinality, since we do an unnecessary shuffle.

We don't have cardinality information at the moment and there is no easy way to get access to them, but we still can do better than what we currently have through looking at the IO partition count/row_count/... of the grouping columns

Assume the following example:

df_left = 1k partitions
df_right = 1 partition

result = df_left.merge(df_right)

result.groupby(columns from right).sum()

Our current default would use 1000 / 15 as the output partition count, but we can infer information about the cardinality that would make split_out=1 a sensible choice. The column originates in a. DataFrame with one partition, which means that cardinality will be low enough to fit into a single partition.

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