[BUG] Conditional statement not supported using Opensearch PPL
Describe the bug
[BUG] Conditional statement not supported using Opensearch PPL. As per documentation https://github.com/opensearch-project/sql/blob/2.x/docs/user/ppl/functions/condition.rst we can use IF statement to filter results which is fine as I used below
source =
Now in next use case if I wanted to use > or < to filter results, its not working its complaining (below error).
"details": "Failed to parse query due to offending symbol [>] at:
I have tried other options like "gt" lr "gte" with "". '' , `` but nothing works.
Next use-case would be case statement, how to use case statement here -- spent many days but didnt get single example anywhere and OPensearch gives weird error which you are not able to understand. Please help!!! Has anyone done this before?
Related component
Search:Query Insights
To Reproduce
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
COndition statement should be supported and add more documentation.
Additional Details
Plugins Please list all plugins currently enabled.
Screenshots If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
- OS: [e.g. iOS]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Hey @ashishthakur55525 if possible can you list out all the use cases that you are looking for. we will prioritize the if clause issue.
Sure If statement is not working with >, <, >=, <= (gretaer than, less than) condition. How to use case statement using PPL. Do we support all functions like percentile, median etc. In Opensearch PPL, cant we use global filters (like variables we have in Grafana)