[Tarantool-patches] [PATCH v1 0/2] sql: fix comparison in IN operator

imeevma at tarantool.org imeevma at tarantool.org
Wed Apr 15 14:47:37 MSK 2020


Prior to this patch-set, comparisons in the IN statement were
performed using SCALAR rules in most cases. This patch-set changes
this behavior for the case when the left value is not a vector
whose length is greater than one. Now the left value is searched
among the right values ​​only if they are comparable. If there is a
value that is not comparable with the left value, the operation
throws an error.

https://github.com/tarantool/tarantool/issues/4692
https://github.com/tarantool/tarantool/tree/imeevma/gh-4692-specify-field-types-in-IN-statement

#ChangeLog
 - The IN operator now always throws an error if there is a value
   on the right that is not comparable with the left value (gh-4256).

Mergen Imeev (2):
  sql: fix comparison in IN with list of values
  sql: fix comparison in IN with subselect

 src/box/sql/expr.c                                 | 43 ++++++++++-
 .../gh-4692-comparison-in-IN-operator.test.lua     | 54 +++++++++++++
 test/sql-tap/in3.test.lua                          |  2 +-
 test/sql-tap/in4.test.lua                          |  4 +-
 test/sql-tap/subquery.test.lua                     |  8 +-
 test/sql-tap/tkt-80e031a00f.test.lua               |  8 +-
 test/sql/boolean.result                            | 88 +++++++---------------
 7 files changed, 132 insertions(+), 75 deletions(-)
 create mode 100755 test/sql-tap/gh-4692-comparison-in-IN-operator.test.lua

-- 
2.7.4



More information about the Tarantool-patches mailing list