-
Notifications
You must be signed in to change notification settings - Fork 49
perf: Improve isin performance #1203
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
Conversation
bigframes/core/nodes.py
Outdated
@@ -284,6 +290,24 @@ def prune(self, used_cols: COLUMN_SET) -> BigFrameNode: | ||
return self.transform_children(lambda x: x.prune(used_cols)) | ||
|
||
|
||
class AdditiveNode: | ||
"""Definition of additive - if you drop added_fields, you end up with the descendent.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A picture might help :-)
"""Definition of additive - if you drop added_fields, you end up with the descendent.""" | |
"""Definition of additive - if you drop added_fields, you end up with the descendent. | |
.. code-block:: text | |
AdditiveNode (fields: a, b, c; added_fields: c) | |
| | |
| additive_base | |
V | |
BigFrameNode (fields: a, b) | |
""" |
See https://stackoverflow.com/a/50956831/101923 for creating a plain text block
def replace_additive_base(self, node: BigFrameNode): | ||
return dataclasses.replace(self, left_child=node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking aloud: I wonder if there's some way we can organize these sorts of tree transformations so that it's easier to reason about which can be applied in which order?
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕