Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
blaginin authored and peter-toth committed Nov 8, 2024
1 parent 4baea8f commit c42668b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions datafusion/common/src/tree_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2086,4 +2086,17 @@ pub(crate) mod tests {

Ok(())
}

#[test]
fn test_large_tree() {
let mut item = TestTreeNode::new_leaf("initial".to_string());
for i in 0..3000 {
item = TestTreeNode::new(vec![item], format!("parent-{}", i));
}

let mut visitor =
TestVisitor::new(Box::new(visit_continue), Box::new(visit_continue));

item.visit(&mut visitor).unwrap();
}
}

0 comments on commit c42668b

Please sign in to comment.