xianbao commited on
Commit
27bbf42
·
verified ·
1 Parent(s): 8b5f408

Update python/2_ancestors.py

Browse files
Files changed (1) hide show
  1. python/2_ancestors.py +1 -1
python/2_ancestors.py CHANGED
@@ -77,7 +77,7 @@ ancestor_children_query = """
77
  ac.depth + 1 -- Increment depth counter
78
  FROM parent_level pl
79
  JOIN ancestor_children_cte ac ON pl.base_tmp_id = ac.child_tmp_id
80
- WHERE ac.depth < 20 -- Limit recursion to 10 levels
81
  )
82
  SELECT
83
  a.id AS ancestor,
 
77
  ac.depth + 1 -- Increment depth counter
78
  FROM parent_level pl
79
  JOIN ancestor_children_cte ac ON pl.base_tmp_id = ac.child_tmp_id
80
+ WHERE ac.depth < 10 -- Limit recursion to 10 levels
81
  )
82
  SELECT
83
  a.id AS ancestor,