Skip to content

Unable to parse SELECT 0 IS NULL #991

@auntyellow

Description

@auntyellow

Describe the bug
Unable to parse SELECT 0 IS NULL

To Reproduce
Steps to reproduce the behavior:

  1. SELECT 0 IS NULL or SELECT 1 IS NOT NULL or SELECT 2 IN (0, 1)
  2. Parsing this SQL using JSqlParser with this statements
  3. Exception: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "IS" at line 1, column 9. Was expecting one of: ...

Expected behavior
Should be able to parse statement.

System

  • Database: MySQL (returns 0) and PostgreSQL (returns false)
  • Java Version: 8
  • JSqlParser version: 3.1, 3.2-SNAPSHOT (with latest master)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions