fn expect_parse_error(sql: &str, expected_error: &str) -> Result<()> {
        match DfParser::parse_sql(sql) {
            Ok(statements) => {
                panic!(
                    "Expected parse error for '{}', but was successful: {:?}",
                    sql, statements
                );
            }
            Err(e) => {
                let error_message = e.to_string();
                assert!(
                    error_message.contains(expected_error),
                    "Expected error '{}' not found in actual error '{}'",
                    expected_error,
                    error_message
                );
            }
        }
        Ok(())
    }
/// Parses sql and asserts that the expected error message was found
Parses sql and asserts that the expected error message was found
Parses sql and asserts that the expected error message was found
fn expect_parse_error(sql: &str, expected_error: &str) -> Result<()> {
        match DfParser::parse_sql(sql) {
            Ok(statements) => {
                panic!(
                    "Expected parse error for '{}', but was successful: {:?}",
                    sql, statements
                );
            }
            Err(e) => {
                let error_message = e.to_string();
                assert!(
                    error_message.contains(expected_error),
                    "Expected error '{}' not found in actual error '{}'",
                    expected_error,
                    error_message
                );
            }
        }
        Ok(())
    }
fn expect_parse_error ( sql : & str , expected_error : & str ) -> Result < ( ) > { match DfParser :: parse_sql ( sql ) { Ok ( statements ) => { panic ! ( " " sql statements ) ; } Err ( e ) => { let error_message = e . to_string ( ) ; assert ! ( error_message contains ( expected_error ) " " expected_error error_message ) ; } } Ok ( ( ) ) }
Parses sql and asserts that the expected error message was found
Parses sql and asserts that the expected error message was found
sql
&str
expected_error
&str
sql
&str
expected_error
&str