@@ -535,7 +535,7 @@ fn parse_invalid_brackets() {
535
535
bigquery_and_generic( )
536
536
. parse_sql_statements( sql)
537
537
. unwrap_err( ) ,
538
- ParserError :: ParserError ( "Expected (, found: >" . to_string( ) )
538
+ ParserError :: ParserError ( "Expected: (, found: >" . to_string( ) )
539
539
) ;
540
540
541
541
let sql = "CREATE TABLE table (x STRUCT<STRUCT<INT64>>>)" ;
@@ -544,7 +544,7 @@ fn parse_invalid_brackets() {
544
544
. parse_sql_statements( sql)
545
545
. unwrap_err( ) ,
546
546
ParserError :: ParserError (
547
- "Expected ',' or ')' after column definition, found: >" . to_string( )
547
+ "Expected: ',' or ')' after column definition, found: >" . to_string( )
548
548
)
549
549
) ;
550
550
}
@@ -1753,11 +1753,11 @@ fn parse_merge_invalid_statements() {
1753
1753
for ( sql, err_msg) in [
1754
1754
(
1755
1755
"MERGE T USING U ON TRUE WHEN MATCHED BY TARGET AND 1 THEN DELETE" ,
1756
- "Expected THEN, found: BY" ,
1756
+ "Expected: THEN, found: BY" ,
1757
1757
) ,
1758
1758
(
1759
1759
"MERGE T USING U ON TRUE WHEN MATCHED BY SOURCE AND 1 THEN DELETE" ,
1760
- "Expected THEN, found: BY" ,
1760
+ "Expected: THEN, found: BY" ,
1761
1761
) ,
1762
1762
(
1763
1763
"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() {
1898
1898
1899
1899
let error_sql = "DECLARE x" ;
1900
1900
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( ) ) ,
1902
1902
bigquery( ) . parse_sql_statements( error_sql) . unwrap_err( )
1903
1903
) ;
1904
1904
1905
1905
let error_sql = "DECLARE x 42" ;
1906
1906
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( ) ) ,
1908
1908
bigquery( ) . parse_sql_statements( error_sql) . unwrap_err( )
1909
1909
) ;
1910
1910
}
@@ -2069,23 +2069,23 @@ fn test_bigquery_create_function() {
2069
2069
"AS ((SELECT 1 FROM mytable)) " ,
2070
2070
"OPTIONS(a = [1, 2])" ,
2071
2071
) ,
2072
- "Expected end of statement, found: OPTIONS" ,
2072
+ "Expected: end of statement, found: OPTIONS" ,
2073
2073
) ,
2074
2074
(
2075
2075
concat ! (
2076
2076
"CREATE TEMPORARY FUNCTION myfunction() " ,
2077
2077
"IMMUTABLE " ,
2078
2078
"AS ((SELECT 1 FROM mytable)) " ,
2079
2079
) ,
2080
- "Expected AS, found: IMMUTABLE" ,
2080
+ "Expected: AS, found: IMMUTABLE" ,
2081
2081
) ,
2082
2082
(
2083
2083
concat ! (
2084
2084
"CREATE TEMPORARY FUNCTION myfunction() " ,
2085
2085
"AS \" console.log('hello');\" " ,
2086
2086
"LANGUAGE js " ,
2087
2087
) ,
2088
- "Expected end of statement, found: LANGUAGE" ,
2088
+ "Expected: end of statement, found: LANGUAGE" ,
2089
2089
) ,
2090
2090
] ;
2091
2091
for ( sql, error) in error_sqls {
@@ -2116,7 +2116,7 @@ fn test_bigquery_trim() {
2116
2116
// missing comma separation
2117
2117
let error_sql = "SELECT TRIM('xyz' 'a')" ;
2118
2118
assert_eq ! (
2119
- ParserError :: ParserError ( "Expected ), found: 'a'" . to_owned( ) ) ,
2119
+ ParserError :: ParserError ( "Expected: ), found: 'a'" . to_owned( ) ) ,
2120
2120
bigquery( ) . parse_sql_statements( error_sql) . unwrap_err( )
2121
2121
) ;
2122
2122
}
0 commit comments