-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Describe the bug
Boolean values in WHERE clause are identified as columns rather than being identified as primitive values like numbers.
To Reproduce
Steps to reproduce the behavior:
- Example SQL
SELECT * FROM tableA WHERE true- Parsing this SQL using JSqlParser with this statements
public static void main(String[] args) throws JSQLParserException {
Select sel = (Select) CCJSqlParserUtil.parse("SELECT * FROM tableA WHERE true");
PlainSelect plainSelect = (PlainSelect) sel.getSelectBody();
System.out.println(plainSelect.getWhere() instanceof Column);
}Expected behavior
Prints false as true in the WHERE clause is not supposed to be considered as a column name.
Actual behavior
Prints true.
System
- Database you are using: PostgreSQL
- Java Version: 11.0.3
- JSqlParser version: 3.1
Metadata
Metadata
Assignees
Labels
No labels