@@ -535,7 +535,7 @@ fn parse_invalid_brackets() {
535535 bigquery_and_generic( )
536536 . parse_sql_statements( sql)
537537 . unwrap_err( ) ,
538- ParserError :: ParserError ( "Expected (, found: >" . to_string( ) )
538+ ParserError :: ParserError ( "Expected: (, found: >" . to_string( ) )
539539 ) ;
540540
541541 let sql = "CREATE TABLE table (x STRUCT<STRUCT<INT64>>>)" ;
@@ -544,7 +544,7 @@ fn parse_invalid_brackets() {
544544 . parse_sql_statements( sql)
545545 . unwrap_err( ) ,
546546 ParserError :: ParserError (
547- "Expected ',' or ')' after column definition, found: >" . to_string( )
547+ "Expected: ',' or ')' after column definition, found: >" . to_string( )
548548 )
549549 ) ;
550550}
@@ -1753,11 +1753,11 @@ fn parse_merge_invalid_statements() {
17531753 for ( sql, err_msg) in [
17541754 (
17551755 "MERGE T USING U ON TRUE WHEN MATCHED BY TARGET AND 1 THEN DELETE" ,
1756- "Expected THEN, found: BY" ,
1756+ "Expected: THEN, found: BY" ,
17571757 ) ,
17581758 (
17591759 "MERGE T USING U ON TRUE WHEN MATCHED BY SOURCE AND 1 THEN DELETE" ,
1760- "Expected THEN, found: BY" ,
1760+ "Expected: THEN, found: BY" ,
17611761 ) ,
17621762 (
17631763 "MERGE T USING U ON TRUE WHEN NOT MATCHED BY SOURCE THEN INSERT(a) VALUES (b)" ,
@@ -1898,13 +1898,13 @@ fn parse_big_query_declare() {
18981898
18991899 let error_sql = "DECLARE x" ;
19001900 assert_eq ! (
1901- ParserError :: ParserError ( "Expected a data type name, found: EOF" . to_owned( ) ) ,
1901+ ParserError :: ParserError ( "Expected: a data type name, found: EOF" . to_owned( ) ) ,
19021902 bigquery( ) . parse_sql_statements( error_sql) . unwrap_err( )
19031903 ) ;
19041904
19051905 let error_sql = "DECLARE x 42" ;
19061906 assert_eq ! (
1907- ParserError :: ParserError ( "Expected a data type name, found: 42" . to_owned( ) ) ,
1907+ ParserError :: ParserError ( "Expected: a data type name, found: 42" . to_owned( ) ) ,
19081908 bigquery( ) . parse_sql_statements( error_sql) . unwrap_err( )
19091909 ) ;
19101910}
@@ -2069,23 +2069,23 @@ fn test_bigquery_create_function() {
20692069 "AS ((SELECT 1 FROM mytable)) " ,
20702070 "OPTIONS(a = [1, 2])" ,
20712071 ) ,
2072- "Expected end of statement, found: OPTIONS" ,
2072+ "Expected: end of statement, found: OPTIONS" ,
20732073 ) ,
20742074 (
20752075 concat ! (
20762076 "CREATE TEMPORARY FUNCTION myfunction() " ,
20772077 "IMMUTABLE " ,
20782078 "AS ((SELECT 1 FROM mytable)) " ,
20792079 ) ,
2080- "Expected AS, found: IMMUTABLE" ,
2080+ "Expected: AS, found: IMMUTABLE" ,
20812081 ) ,
20822082 (
20832083 concat ! (
20842084 "CREATE TEMPORARY FUNCTION myfunction() " ,
20852085 "AS \" console.log('hello');\" " ,
20862086 "LANGUAGE js " ,
20872087 ) ,
2088- "Expected end of statement, found: LANGUAGE" ,
2088+ "Expected: end of statement, found: LANGUAGE" ,
20892089 ) ,
20902090 ] ;
20912091 for ( sql, error) in error_sqls {
@@ -2116,7 +2116,7 @@ fn test_bigquery_trim() {
21162116 // missing comma separation
21172117 let error_sql = "SELECT TRIM('xyz' 'a')" ;
21182118 assert_eq ! (
2119- ParserError :: ParserError ( "Expected ), found: 'a'" . to_owned( ) ) ,
2119+ ParserError :: ParserError ( "Expected: ), found: 'a'" . to_owned( ) ) ,
21202120 bigquery( ) . parse_sql_statements( error_sql) . unwrap_err( )
21212121 ) ;
21222122}
0 commit comments