Closed S-YOU closed 2 years ago
Following returns true in spanner query.
SELECT TRUE OR FALSE AND FALSE
But current AST returns following
Expr: &ast.BinaryExpr{ Op: "AND", Left: &ast.BinaryExpr{ Op: "OR", Left: &ast.BoolLiteral{ ValuePos: 7, Value: true, }, Right: &ast.BoolLiteral{ ValuePos: 15, Value: false, }, }, Right: &ast.BoolLiteral{ ValuePos: 25, Value: false, }, }, },
Which will evaluate to false, which is not correct I think and spec says AND has higher precedence.
false
https://cloud.google.com/spanner/docs/reference/standard-sql/operators
@S-YOU Thank you!
Following returns true in spanner query.
But current AST returns following
Which will evaluate to
false
, which is not correct I think and spec says AND has higher precedence.https://cloud.google.com/spanner/docs/reference/standard-sql/operators