aharpervc commented on code in PR #1831:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/1831#discussion_r2067461233


##########
src/test_utils.rs:
##########
@@ -166,6 +168,30 @@ impl TestedDialects {
         only_statement
     }
 
+    /// The same as [`one_statement_parses_to`] but it works for a multiple 
statements
+    pub fn statements_parse_to(
+        &self,
+        sql: &str,
+        statement_count: usize,
+        canonical: &str,
+    ) -> Vec<Statement> {
+        let statements = self.parse_sql_statements(sql).expect(sql);
+        assert_eq!(statements.len(), statement_count);

Review Comment:
   Hm, I don't fully understand. Without this line you can't guarantee that the 
string you feed in has exactly the number of statements you intend it to parse. 
Also, `one_statement_parses_to` has this same assertion before the if/else.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to