Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1 0/2] sql: fix comparison in IN operator
@ 2020-04-15 11:47 imeevma
  2020-04-15 11:47 ` [Tarantool-patches] [PATCH v1 1/2] sql: fix comparison in IN with list of values imeevma
  2020-04-15 11:47 ` [Tarantool-patches] [PATCH v1 2/2] sql: fix comparison in IN with subselect imeevma
  0 siblings, 2 replies; 11+ messages in thread
From: imeevma @ 2020-04-15 11:47 UTC (permalink / raw)
  To: v.shpilevoy, tsafin, tarantool-patches

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-03 17:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 11:47 [Tarantool-patches] [PATCH v1 0/2] sql: fix comparison in IN operator imeevma
2020-04-15 11:47 ` [Tarantool-patches] [PATCH v1 1/2] sql: fix comparison in IN with list of values imeevma
2020-04-27 22:53   ` Vladislav Shpilevoy
2020-04-30 10:32     ` Mergen Imeev
2020-05-03 17:17       ` Vladislav Shpilevoy
2020-04-15 11:47 ` [Tarantool-patches] [PATCH v1 2/2] sql: fix comparison in IN with subselect imeevma
2020-04-19 17:47   ` Vladislav Shpilevoy
2020-04-22 10:03     ` Mergen Imeev
2020-04-27 22:53       ` Vladislav Shpilevoy
2020-04-30 10:22         ` Mergen Imeev
2020-05-03 17:17           ` Vladislav Shpilevoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox