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


##########
tests/sqlparser_common.rs:
##########
@@ -272,20 +275,39 @@ fn parse_insert_default_values() {
         "INSERT INTO test_table DEFAULT VALUES (some_column)";
     assert_eq!(
         ParserError::ParserError("Expected: end of statement, found: 
(".to_string()),
-        
parse_sql_statements(insert_with_default_values_and_hive_after_columns).unwrap_err()
+        all_dialects_requiring_semicolon_statement_delimiter()

Review Comment:
   Turning on the option to make semicolons optional results in this test 
failures:
   
   ```
   thread 'parse_insert_default_values' panicked at src/test_utils.rs:101:21:
   assertion `left == right` failed: Parse results with PostgreSqlDialect are 
different from MsSqlDialect
     left: Err(ParserError("Expected: end of statement, found: ("))
    right: Err(ParserError("Expected: SELECT, VALUES, or a subquery in the 
query body, found: some_column"))
   ```
   
   Since that's a parser error in both cases (but different message) I split 
the assertion out into two -- one for semicolons required that asserts the 
former error, and one for semicolons optional that asserts the other error.



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