Negative numeric literals are wrapped in unary operators. #1482
Open
Description
Description
Given a numeric literal like -1
, this becomes an AST like unary_minus(literal(1))
which has strange downstream implications. The desired behavior is to have the sign as part of the literal like literal(-1)
.
To Reproduce
Steps to reproduce the behavior:
I noticed when pretty-printing I got -(1)
back rather than -1
.
Expected Behavior
-1
-- AST literal(-1)
Additional Context
- Java version: 11
- PartiQL version: 0.14.5