SUM(IF(INTERVAL print error log "no viable alternative at input"
Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed GitHub issues.
- Read documentation: ShardingSphere Doc.
Please pay attention on issues you submitted, because we maybe need more details. If no response more than 7 days and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
4.0.0-RC1
Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
Actual behavior
line 3:68 no viable alternative at input 'SUM(if(state=0andINTERVAL(total_amount,0,200.00)=1,' (It runs fine on version 3.0.0.M4)
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
SQL like: select SUM(if(state=0 and INTERVAL(total_amount,${rangeParam.range1},${rangeParam.range2})=1,1,0)) as successNum1 from order;
INTERVAL is MySQL keyword, function name need include this keyword