@@ -254,6 +254,12 @@ fn parse_create_function() {
254254 ";
255255 let _ = ms ( ) . verified_stmt ( multi_statement_function) ;
256256
257+ let multi_statement_function_without_as = multi_statement_function. replace ( " AS" , "" ) ;
258+ let _ = ms ( ) . one_statement_parses_to (
259+ & multi_statement_function_without_as,
260+ multi_statement_function,
261+ ) ;
262+
257263 let create_function_with_conditional = "\
258264 CREATE FUNCTION some_scalar_udf() \
259265 RETURNS INT \
@@ -297,6 +303,13 @@ fn parse_create_function() {
297303 ";
298304 let _ = ms ( ) . verified_stmt ( create_inline_table_value_function) ;
299305
306+ let create_inline_table_value_function_without_as =
307+ create_inline_table_value_function. replace ( " AS" , "" ) ;
308+ let _ = ms ( ) . one_statement_parses_to (
309+ & create_inline_table_value_function_without_as,
310+ create_inline_table_value_function,
311+ ) ;
312+
300313 let create_multi_statement_table_value_function = "\
301314 CREATE FUNCTION some_multi_statement_tvf(@foo INT, @bar VARCHAR(256)) \
302315 RETURNS @t TABLE (col_1 INT) \
@@ -307,6 +320,13 @@ fn parse_create_function() {
307320 END\
308321 ";
309322 let _ = ms ( ) . verified_stmt ( create_multi_statement_table_value_function) ;
323+
324+ let create_multi_statement_table_value_function_without_as =
325+ create_multi_statement_table_value_function. replace ( " AS" , "" ) ;
326+ let _ = ms ( ) . one_statement_parses_to (
327+ & create_multi_statement_table_value_function_without_as,
328+ create_multi_statement_table_value_function,
329+ ) ;
310330}
311331
312332#[ test]
0 commit comments