Hello,

I've encountered weird parsing of infix cast with the babel parser, where
given the
following query:
SELECT -1 :: INT FROM t;
It will parse it as
UNARY_MINUS( CAST( 1 AS INT )),
while i've expected it to be
CAST(-1 AS INT)

As i've looked at the code I saw that the precedence of the INFIX_CAST is
94, and the precedence of the UNARY_MINUS is 80.

Is there a reason for the INFIX_CAST's precedence to be that high? Other
binary operators such as BINARY_PLUS have precedence of 40.

Thanks,

Itiel

Reply via email to