On Wed, Jul 22, 2015 at 5:44 PM, Jacques Nadeau <[email protected]> wrote:

> Good point.  It is because in case the expression is evaluated after the
> data is materialized (yours) and the other the expression is evaluated at
> the same time the data is materialized (mine).  In the case that they are
> evaluated simultaneously, we're treating as an INT until the data gets to
> big.  As such, my query works, yours doesn't, and neither does mine once
> the value gets beyond the data type capacity:
>
> SELECT STRING_BINARY(CONVERT_TO(2147483648, 'INT')) as i from (VALUES
> (1));
>
> I'm not sure if this is a bug or a feature.
>

It is confusing, for sure.

Reply via email to