Skip to content

Commit

Permalink
fix depth
Browse files Browse the repository at this point in the history
  • Loading branch information
ttusing committed Aug 9, 2024
1 parent f4eeff9 commit 9b8e887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/dbt/graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def select_children(
while len(selected) > 0 and (max_depth is None or i < max_depth):
next_layer: Set[UniqueId] = set()
for node in selected:
next_layer.update(self.graph.descendants(node))
next_layer.update(self.descendants(node, 1))
next_layer = next_layer - children # Avoid re-searching
children.update(next_layer)
selected = next_layer
Expand All @@ -86,7 +86,7 @@ def select_parents(
while len(selected) > 0 and (max_depth is None or i < max_depth):
next_layer: Set[UniqueId] = set()
for node in selected:
next_layer.update(self.graph.ancestors(node))
next_layer.update(self.ancestors(node, 1))
next_layer = next_layer - parents # Avoid re-searching
parents.update(next_layer)
selected = next_layer
Expand Down

0 comments on commit 9b8e887

Please sign in to comment.