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

predicate result is wrong #44

Closed
weinvest opened this issue Apr 10, 2016 · 2 comments
Closed

predicate result is wrong #44

weinvest opened this issue Apr 10, 2016 · 2 comments
Labels

Comments

@weinvest
Copy link

json:
{
"books" : [
{
"id" : 1,
"title" : "Clean Code",
"author" : { "name" : "Robert C. Martin" },
"price" : 17.96
},
{
"id" : 2,
"title" : "Maintainable JavaScript",
"author" : { "name" : "Nicholas C. Zakas" },
"price" : -10
},
{
"id" : 3,
"title" : "Agile Software Development",
"author" : { "name" : "Robert C. Martin" },
"price" : 20
},
{
"id" : 4,
"title" : "JavaScript: The Good Parts",
"author" : { "name" : "Douglas Crockford" },
"price" : 15.67
}
],
"oks":[{"id":8}]
}

query: .books{ -(.price - 5 + 5 ) == 10 } is null
but query: .books{ -(.price + 5 - 5 ) == 10 } is right

@dfilatov
Copy link
Owner

Hi, @weinvest!
Bug is confirmed.

@dfilatov dfilatov added the bug label Apr 12, 2016
dfilatov added a commit that referenced this issue Apr 12, 2016
Fix order of arithmetic operations (close #44)
@dfilatov
Copy link
Owner

Fixed in 0.3.3

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

No branches or pull requests

2 participants