Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

operator precedence of AND/OR in where #41

Closed
kibtidec opened this issue Jan 22, 2017 · 3 comments
Closed

operator precedence of AND/OR in where #41

kibtidec opened this issue Jan 22, 2017 · 3 comments
Assignees
Labels

Comments

@kibtidec
Copy link

I see in #20 that operator precedence has been improved/fixed. Nevertheless I still observe an issue with AND and OR.

The following two expressions result in the same AST, but shouldn't.

select x from foo where (a or b) and c
select x from foo where a or b and c

Tested with v1.0.0 and also the online demo

@nwronski nwronski self-assigned this Jan 23, 2017
@nwronski nwronski added the bug label Jan 23, 2017
nwronski added a commit that referenced this issue Jan 23, 2017
@nwronski
Copy link
Contributor

You're right, AND should compose before OR in the second statement. There is an initial fix in master but I will need some more time to test it out before I publish a new release on npm. Thanks!

@kibtidec
Copy link
Author

Thank you. Fix works for me and doesn't break any of my existing tests. I will add a few more to see if there are any side effects.

@nwronski
Copy link
Contributor

nwronski commented Jul 7, 2017

Released in v1.0.1, thanks!

@nwronski nwronski closed this as completed Jul 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants