Merge projection selects too many columns#283
Merged
Conversation
rjzamora
reviewed
Aug 30, 2023
dask_expr/_merge.py
Outdated
Comment on lines
+206
to
+213
| if isinstance(self.left_on, list): | ||
| left_on = self.left_on | ||
| else: | ||
| left_on = [self.left_on] if self.left_on is not None else [] | ||
| if isinstance(self.right_on, list): | ||
| right_on = self.right_on | ||
| else: | ||
| right_on = [self.right_on] if self.right_on is not None else [] |
Member
There was a problem hiding this comment.
Suggested change
| if isinstance(self.left_on, list): | |
| left_on = self.left_on | |
| else: | |
| left_on = [self.left_on] if self.left_on is not None else [] | |
| if isinstance(self.right_on, list): | |
| right_on = self.right_on | |
| else: | |
| right_on = [self.right_on] if self.right_on is not None else [] | |
| left_on = _convert_to_list(self.left_on) | |
| right_on = _convert_to_list(self.right_on) |
This seems more readable to me, but you will need to add the following import _convert_to_list from dask_expr._util at the top.
rjzamora
reviewed
Aug 30, 2023
Comment on lines
+208
to
+209
| if left_on is None: | ||
| left_on = [] |
Member
There was a problem hiding this comment.
Curious why you need this? Tests seem to pass fine without it.
Member
There was a problem hiding this comment.
If this is necessary, then we probably want to clean up the dead logic below that assumes left_on and right_on could be None.
Collaborator
Author
There was a problem hiding this comment.
Yeah sorry that got a bit too entangled, that's needed for #284 (which also cleans up the dead logic)
rjzamora
approved these changes
Aug 30, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.