Hi All,

Please consider the following SQL:

select INT_COLUMN * INT_COLUMN from SOME_TABLE;

The data type of the INT_COLUMN * INT_COLUMN expression is still an INTEGER
provided that the INT_COLUMN type is INTEGER as well. This could lead to a
potential overflow if the column value is big enough.

Is there a way to force Calcite to promote the final expression type to
BIGINT in this case to make sure that its result always always fit into a
valid range? The same question applies to other binary operations with
numeric types.

Thank you,
Mike

Reply via email to