[Tarantool-discussions] Check implicit cast between strings and numbers

Mergen Imeev imeevma at tarantool.org
Mon Jul 6 16:52:23 MSK 2020


Peter, could you please take a look at my branch and say if
something is wrong with the implicit casts between strings and
numerics. I mean, there shouldn't be any.

Branch: imeevma/gh-3809-disallow-imlicit-cast-from-string-to-nums

There should be no implicit casts for assignment after this patch,
except for the following:
1) Any type can be implicitly cast to ANY.
2) Any scalar type can be implicitly cast to SCALAR.
3) Any numeric type can be implicitly cast to NUMBER.
4) In some cases, numbers can be implicitly converted to another
number type. The rules can be seen in the commit message of the

For comparison, we say that any numbers can be compared with each
other. However, you may find some cases where the result is not
what it should be. This will be fixed in another issue.

Also, comparison with SCALAR does not work correctly. This will
also be fixed later after we decide how this should work.

More information about the Tarantool-discussions mailing list