iffyio commented on code in PR #1725:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1725#discussion_r1962877173
##########
src/ast/visitor.rs:
##########
@@ -889,34 +909,74 @@ mod tests {
),
];
for (sql, expected) in tests {
- let actual = do_visit(sql);
- let actual: Vec<_> = actual.iter().map(|x| x.as_str()).collect();
+ let mut visitor = TestVisitor::default();
+ let _ = do_visit(sql, &mut visitor);
+ let actual: Vec<_> = visitor.visited.iter().map(|x|
x.as_str()).collect();
assert_eq!(actual, expected)
}
}
+}
- struct QuickVisitor; // [`TestVisitor`] is too slow to iterate over
thousands of nodes
Review Comment:
is it reasonable to reserve the overflow test case? it sounded like it was
supposed to test ability to cover large number of entries
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]