couchbaselabs / gojsonsm

Go implementation of my JSONSM algorithm.
9 stars 7 forks source link

Extra Parenthesis leads to incorrect logic #111

Closed nelio2k closed 5 years ago

nelio2k commented 5 years ago

For this expression: (county = "United States" OR country = "Canada" AND type="brewery") OR (type="beer" AND DATE(updated) >= DATE("2019-01-01"))

things work correctly.

However, when extra parenthesis are added: ((county = "United States" OR country = "Canada") AND type="brewery") OR (type="beer" AND DATE(updated) >= DATE("2019-01-01"))

the logic is broken.

Need investigating on why the AST is different.