Closed

Description
Describe the bug
parse IF function error when first param(boolean) include logical operation
OK: sum(if(column1 in('value1', 'value2'), 1, 0)) as tcp_logs
ERROR: sum(if(column1 in ('value1', 'value2') and column2 = 'value3', 1, 0))
To Reproduce
Steps to reproduce the behavior:
- Example SQL
select
sum(if(column1 in('value1', 'value2'), 1, 0)) as tcp_logs,
sum(if(column1 in ('value1', 'value2') and column2 = 'value3', 1, 0)) as base_tcp_logs
from
table1
where
recv_time >= toDateTime('2021-07-20 00:00:00')
and recv_time < toDateTime('2021-07-21 00:00:00') - Parsing this SQL using JSqlParser with this statements
CCJSqlParserUtil.parse(sql) - Exception
net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "(" "("
System
- JSqlParser version 4.1
Thanks!