[Tarantool-patches] [PATCH] sql: fix bug <IN> type mismatch error

Nikita Pettik korablev at tarantool.org
Mon Feb 10 16:48:27 MSK 2020


On 10 Feb 13:54, Mergen Imeev wrote:
> Hello! Thanks for the patch. In general, I think that part of the
> problem will be solved along with the solution to problem #4230
> ("sql: implicit type cast during comparison"). But since #4230 is
> still under discussion, it might be better to fix the bug with
> your patch. Still, I think that most of this patch will be
> rewritten in #4230.

Guys, result of IN operation must be equal (in all senses) to the result
of one-by-one explicit comparisons:

SELECT true IN (1, 2, 3);  <==> SELECT true == 1 OR true == 2 OR true == 3;

The latter raises an error, since there's no implicit conversion between
booleans and numerics. Hence, the goal of issue not only to make results
IN operations be equal, but rather make it return the same correct result
(i.e. as comparison does).
 


More information about the Tarantool-patches mailing list