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


##########
src/test_utils.rs:
##########
@@ -186,6 +187,37 @@ impl TestedDialects {
         statements
     }
 
+    /// The same as [`statements_parse_to`] but it will strip semicolons from 
the SQL text.
+    pub fn statements_without_semicolons_parse_to(
+        &self,
+        sql: &str,
+        canonical: &str,
+    ) -> Vec<Statement> {
+        let sql_without_semicolons = sql
+            .replace("; ", " ")
+            .replace(" ;", " ")
+            .replace(";\n", "\n")
+            .replace("\n;", "\n")
+            .replace(";", " ");

Review Comment:
   I'm preserving the newline/whitespace around the statement delimiter because 
I'm trying to avoid being opinionated on whether they're meaningful or not _in 
this helper_. i.e., the helper should only strip semicolons and should avoid 
other transformations. I can add a comment



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