@@ -254,6 +254,12 @@ fn parse_create_function() {
254
254
";
255
255
let _ = ms ( ) . verified_stmt ( multi_statement_function) ;
256
256
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
+
257
263
let create_function_with_conditional = "\
258
264
CREATE FUNCTION some_scalar_udf() \
259
265
RETURNS INT \
@@ -297,6 +303,13 @@ fn parse_create_function() {
297
303
";
298
304
let _ = ms ( ) . verified_stmt ( create_inline_table_value_function) ;
299
305
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
+
300
313
let create_multi_statement_table_value_function = "\
301
314
CREATE FUNCTION some_multi_statement_tvf(@foo INT, @bar VARCHAR(256)) \
302
315
RETURNS @t TABLE (col_1 INT) \
@@ -307,6 +320,13 @@ fn parse_create_function() {
307
320
END\
308
321
";
309
322
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
+ ) ;
310
330
}
311
331
312
332
#[ test]
0 commit comments