Description
Describe the bug
JSQLParser is throwing an unexpected token error with certain alias names, specifically "filter" and "start".
To Reproduce
Steps to reproduce the behavior:
-
Example SQL
select viID as r,
lower(concat(vName,'[]',viItem,'[]',viDesc)) as filter
from tVendorItem vi
inner join vendorinfo v on vi.cn=v.cn and viVendor=v.vId
inner join tUnits u on vi.cn=u.cn and vi.viUsageUM=u.uRow
left join tVendorItemFamily vf on vi.cn=vf.cn and vi.viId=vf.Item and vf.Family=?
where vi.cn=@cn and (viId=? or (find_in_set(vi.Purpose,?)>0 and viInactive=0 and vf.Family>0))
order by vName,viItem -
Parsing this SQL using JSqlParser with this statements
SimpleNode node = (SimpleNode) CCJSqlParserUtil.parseAST(sqlInput); -
Exception
Encountered unexpected token: "filter" "FILTER"
at line 2, column 52.
Expected behavior
Expected to parse the same as all the other alias names that I've tested
System
- MySQL 8.0
- Java Version - JDK 8
- JSqlParser version - 4.1