-
Notifications
You must be signed in to change notification settings - Fork 43
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
refactor: Tree traversals now non-recursive #1386
Conversation
af4acb5
to
e0691d1
Compare
bigframes/core/plan.py
Outdated
from typing import Callable, Dict, Generator, Iterable, Mapping, Set, Tuple | ||
|
||
import bigframes.core.guid | ||
import bigframes.core.identifiers |
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.
Here we have two imports for the same module.
Could you use from bigframes.core import identifiers
and resolve all module references? go/pydev#imports
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.
ok, yeah, that is nicer, done
bigframes/core/plan.py
Outdated
for child in item.child_nodes: | ||
yield (item, child) | ||
|
||
def topo(self: BigFrameNode) -> Generator[BigFrameNode, None, None]: |
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.
name suggestion: topo_ordered_nodes
or get_nodes_in_topo_order
or something similar to reflect the fact that we are returning a collection of nodes.
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.
renamed to iter_nodes_topo
bigframes/core/plan.py
Outdated
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.
Let's update the filename with anything that accurately describes the content, and preferably ends with "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.
renamed to bigframe_node.py
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> 🦕