@@ -1088,32 +1088,15 @@ pub fn expr_element(i: Input) -> IResult<WithSpan<ExprElement>> {
10881088 #function_name
10891089 ~ "(" ~ #comma_separated_list1( subexpr( 0 ) ) ~ ")"
10901090 ~ "(" ~ DISTINCT ? ~ #comma_separated_list0( subexpr( 0 ) ) ? ~ ")"
1091- ~ #window_function
1091+ ~ #window_function?
10921092 } ,
10931093 |( name, _, params, _, _, opt_distinct, opt_args, _, window) | ExprElement :: FunctionCall {
10941094 func : FunctionCall {
10951095 distinct : opt_distinct. is_some ( ) ,
10961096 name,
10971097 args : opt_args. unwrap_or_default ( ) ,
10981098 params,
1099- window : Some ( window) ,
1100- lambda : None ,
1101- } ,
1102- } ,
1103- ) ;
1104- let function_call_with_params = map (
1105- rule ! {
1106- #function_name
1107- ~ "(" ~ #comma_separated_list1( subexpr( 0 ) ) ~ ")"
1108- ~ "(" ~ DISTINCT ? ~ #comma_separated_list0( subexpr( 0 ) ) ? ~ ")"
1109- } ,
1110- |( name, _, params, _, _, opt_distinct, opt_args, _) | ExprElement :: FunctionCall {
1111- func : FunctionCall {
1112- distinct : opt_distinct. is_some ( ) ,
1113- name,
1114- args : opt_args. unwrap_or_default ( ) ,
1115- params,
1116- window : None ,
1099+ window,
11171100 lambda : None ,
11181101 } ,
11191102 } ,
@@ -1406,7 +1389,6 @@ pub fn expr_element(i: Input) -> IResult<WithSpan<ExprElement>> {
14061389 | #function_call_with_lambda : "`function(..., x -> ...)`"
14071390 | #function_call_with_window : "`function(...) OVER ([ PARTITION BY <expr>, ... ] [ ORDER BY <expr>, ... ] [ <window frame> ])`"
14081391 | #function_call_with_params_window : "`function(...)(...) OVER ([ PARTITION BY <expr>, ... ] [ ORDER BY <expr>, ... ] [ <window frame> ])`"
1409- | #function_call_with_params : "`function(...)(...)`"
14101392 | #function_call : "`function(...)`"
14111393 ) ,
14121394 rule ! (
0 commit comments