Skip to content

Conversation

@hendrikmakait
Copy link
Member

IFF a shuffle has the exact same input and parameters, P2P hash join should reuse it.

Follow-up to #360

token_left = token + "-left"
token_right = token + "-right"
token_left = _tokenize_deterministic(
self.left._name, self.shuffle_left_on, self.npartitions, self._partitions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume how doesn't matter in the shuffle algorithm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that will only become relevant in the actual merge, which happens after we shuffled all the data.

token_left = token + "-left"
token_right = token + "-right"
token_left = _tokenize_deterministic(
"hash-join",
Copy link
Member Author

@hendrikmakait hendrikmakait Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this to ensure that we avoid any unwanted sharing between merges and shuffles. I don't have a good-enough overview right now to make sharing between them work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can rely on name_input_{left/right} to truly be unique and identify distinct input dataframes, I believe we can even share between merges and ordinary shuffles. I wonder where this use case would come up, though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main concern here is that shuffle_transfer and merge_transfer do different things. We'd have to refactor this so that they are in fact interchangeable and shareable. I guess there are only few cases where this would come in handy though. Maybe something like joining a dataframe on x and aggregating that same dataframe on x within the same graph?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes they do slightly different things at the moment, because the merge layer caused all kinds of troubles before that. This is on my todo list to align more closely.

@phofl phofl merged commit bf8dcbe into dask:main Oct 27, 2023
@phofl
Copy link
Collaborator

phofl commented Oct 27, 2023

thx @hendrikmakait

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.

3 participants