Skip to content

Support "IS NOT TRUE/FALSE" syntax #2265

Description

@wangxiaoying

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Currently when the sql query contains is not true/false, the following error will be thrown:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: SQL(ParserError("Expected [NOT] NULL or [NOT] DISTINCT FROM after IS, found: NOT"))'

Describe the solution you'd like
col is not true(false) should have the same result with col is NULL or col = false(true). For example in postgres, it works like follow:
image

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
It looks like the error happens when parsing the query at here. Might need to support this syntax in sqlparser first.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions