LucaCappelletti94 commented on code in PR #2389:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2389#discussion_r3721883712
##########
src/ast/visitor.rs:
##########
@@ -1059,7 +1059,7 @@ mod tests {
#[cfg(test)]
mod visit_mut_tests {
- use crate::ast::{Ident, Statement, Value, ValueWithSpan, VisitMut,
VisitorMut};
+ use crate::ast::{Ident, Statement, Value, ValueWithSpan, Visit, VisitMut,
Visitor, VisitorMut};
Review Comment:
Just eyeballing, but I would wager you need to run a ` cargo fmt --all --
--check`.
##########
src/ast/visitor.rs:
##########
@@ -1139,4 +1139,26 @@ mod visit_mut_tests {
let mutated = do_visit_mut("SELECT a, b FROM t", &mut visitor);
assert_eq!(mutated.to_string(), "SELECT A, B FROM T");
}
+
+ struct DummyVisitor;
+ impl Visitor for DummyVisitor {
Review Comment:
I suggest you have the dummy visitor do something, like count nodes
##########
src/ast/visitor.rs:
##########
@@ -1139,4 +1139,26 @@ mod visit_mut_tests {
let mutated = do_visit_mut("SELECT a, b FROM t", &mut visitor);
assert_eq!(mutated.to_string(), "SELECT A, B FROM T");
}
+
+ struct DummyVisitor;
+ impl Visitor for DummyVisitor {
+ type Break = ();
+ }
+
+ struct DummyVisitorMut;
+ impl VisitorMut for DummyVisitorMut {
Review Comment:
And the dummy visitor mut to edit the nodes it visits.
--
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]