Eason0729 commented on code in PR #1522:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1522#discussion_r1844934805


##########
src/ast/visitor.rs:
##########
@@ -884,4 +884,29 @@ mod tests {
             assert_eq!(actual, expected)
         }
     }
+
+    struct QuickVisitor; // [`TestVisitor`] is too slow to iterate over 
thousands of nodes
+
+    impl Visitor for QuickVisitor {
+        type Break = ();
+    }
+
+    #[test]
+    fn overflow() {
+        let cond = (0..1000)

Review Comment:
   Same reason as `sqlparser_common::overflow` test. Maybe we could increase 
it(increase the number `1000`).



##########
tests/sqlparser_common.rs:
##########
@@ -11748,3 +11748,16 @@ fn parse_create_table_select() {
         );
     }
 }
+
+#[test]
+fn overflow() {
+    let expr = std::iter::repeat("1")
+        .take(1000)

Review Comment:
   1000 is reasonable for general usage, but 1000 won't overflow without 
recursive macro. Maybe we could increase it.



##########
sqlparser_bench/benches/sqlparser_bench.rs:
##########
@@ -42,6 +42,46 @@ fn basic_queries(c: &mut Criterion) {
     group.bench_function("sqlparser::with_select", |b| {
         b.iter(|| Parser::parse_sql(&dialect, with_query));
     });
+

Review Comment:
   For `large_statement`, making separated test would make differentiating 
potential(future) regression easier.
   It's a suggestion(fine to leave it as it is).



-- 
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]

Reply via email to