You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] IF function contain equal expression return ExpressionEvaluationException #3992
changed the title [-][BUG] IF contain equal expression return ExpressionEvaluationException[/-][+][BUG] IF function contain equal expression return ExpressionEvaluationException[/+]on Aug 6, 2025
For each argument, it allows you to specify a name for it. The name is dropped afterwards. Therefore, foo(param1=1, param2='b') is equivalent to foo(1, 'b'). In the same manner, if(httpstatus='200', 1, 0) is interpreted as if('200', 1, 0).
Other comparison operator works: if(httpstatus!='200', 1, 0) or if(httpstatus>'200', 1, 0)
Activity
[-][BUG] IF contain equal expression return ExpressionEvaluationException[/-][+][BUG] IF function contain equal expression return ExpressionEvaluationException[/+]yuancu commentedon Aug 7, 2025
Root cause analysis:
The problem arises from the PPL grammar at OpenSearchPPLParser.g4#L597
For each argument, it allows you to specify a name for it. The name is dropped afterwards. Therefore,
foo(param1=1, param2='b')is equivalent tofoo(1, 'b'). In the same manner,if(httpstatus='200', 1, 0)is interpreted asif('200', 1, 0).Other comparison operator works:
if(httpstatus!='200', 1, 0)orif(httpstatus>'200', 1, 0)yuancu commentedon Aug 7, 2025
It turns out that named parameters are exclusively used in table functions. I'll fix it by eliminating name parameters in other functions.