Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "IS NOT TRUE/FALSE" syntax #2265

Closed
wangxiaoying opened this issue Apr 18, 2022 · 1 comment · Fixed by #3252
Closed

Support "IS NOT TRUE/FALSE" syntax #2265

wangxiaoying opened this issue Apr 18, 2022 · 1 comment · Fixed by #3252
Labels
enhancement New feature or request

Comments

@wangxiaoying
Copy link

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.

@wangxiaoying wangxiaoying added the enhancement New feature or request label Apr 18, 2022
@sarahyurick
Copy link
Contributor

"IS NOT TRUE/FALSE" should be possible now that apache/datafusion-sqlparser-rs#583 has been merged. I can start working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants