aharpervc commented on code in PR #1949:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1949#discussion_r2220434233
##########
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:
Good point. At some point I was probably testing this in conjunction with
https://github.com/apache/datafusion-sqlparser-rs/pull/1809 and might have
gotten it from there. Regardless, I'll simplify it here per your suggestion.
--
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]