Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] IF function does not work inside aggregation function #1076

Open
penghuo opened this issue Mar 3, 2025 · 1 comment
Open

[BUG] IF function does not work inside aggregation function #1076

penghuo opened this issue Mar 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@penghuo
Copy link
Collaborator

penghuo commented Mar 3, 2025

What is the bug?
The following PPL query throw syntax error exception. ANTLR parse IF as keywordsCanBeId, instead of functionName.

source=tbl | stats sum(IF(a>10, 1, 0)) by group
@penghuo penghuo added bug Something isn't working untriaged labels Mar 3, 2025
@LantaoJin
Copy link
Member

seems a bug in expression if(a>10, 1, 0). source=tbl | stats sum(IF(like(b, '%Hello%'), 1, 0)) by group works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants