Issue Title: Parser Error with function(if(xx,xx,xx)) in all versions 4.9-5.3
Description:
The parser fails to handle SQL statements containing aggregate functions with IF expressions (like sum(if()), max(if())). This occurs in all versions from 4.9 to 5.3.
Steps to Reproduce:
- Try to parse any of these SQL statements:
SELECT sum(if(column1=2, column1, 0)) FROM tb_a
SELECT max(if(column1=2, column1, 0)) FROM tb_a
Expected Behavior:
The parser should successfully parse these valid SQL expressions containing IF functions within aggregate functions.
Actual Behavior:
Parser throws an exception:
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
at line 1, column 13.
Was expecting one of:
<ST_SEMICOLON>
Issue Title: Parser Error with
function(if(xx,xx,xx))in all versions 4.9-5.3Description:
The parser fails to handle SQL statements containing aggregate functions with IF expressions (like
sum(if()),max(if())). This occurs in all versions from 4.9 to 5.3.Steps to Reproduce:
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
at line 1, column 13.
Was expecting one of:
<ST_SEMICOLON>