From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 05D662BBDE for ; Sun, 14 Apr 2019 11:04:14 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8mls6DrwpmuB for ; Sun, 14 Apr 2019 11:04:13 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 00D002BB28 for ; Sun, 14 Apr 2019 11:04:12 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH 0/9] Introduce type BOOLEAN in SQL Date: Sun, 14 Apr 2019 18:03:58 +0300 Message-Id: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, kostja@tarantool.org, Nikita Pettik Branch: https://github.com/tarantool/tarantool/tree/np/gh-3648-sql-introduce-bool Issue: https://github.com/tarantool/tarantool/issues/3648 Issue: https://github.com/tarantool/tarantool/issues/3723 This patch-set makes type BOOLEAN available in SQL. It consists of two main parts: first one itroduces basic boolean capabilities like new literals, column type, insert/select etc; second one makes predicates and search condition used in WHERE and JOIN clauses accept and return boolean values. For ANSI compliance see thread in @dev with subject "[dev] Boolean type in SQL" Nikita Pettik (9): sql: refactor mem_apply_numeric_type() sql: disallow text values participate in sum() aggregate sql: use msgpack types instead of custom ones sql: introduce type boolean sql: improve type determination for column meta sql: make comparison predicate return boolean sql: make predicates accept and return boolean sql: make LIKE predicate return boolean result sql: make accept only boolean extra/mkkeywordhash.c | 5 + src/box/bind.c | 37 +- src/box/execute.c | 21 +- src/box/lua/execute.c | 7 +- src/box/lua/lua_sql.c | 15 +- src/box/sql/build.c | 11 +- src/box/sql/date.c | 2 +- src/box/sql/expr.c | 107 ++-- src/box/sql/func.c | 155 +++--- src/box/sql/legacy.c | 2 +- src/box/sql/parse.y | 19 +- src/box/sql/parse_def.c | 5 + src/box/sql/select.c | 4 +- src/box/sql/sqlInt.h | 31 +- src/box/sql/vdbe.c | 154 +++--- src/box/sql/vdbeInt.h | 24 +- src/box/sql/vdbeapi.c | 88 ++- src/box/sql/vdbeaux.c | 31 +- src/box/sql/vdbemem.c | 81 ++- src/box/sql/where.c | 3 +- src/box/sql/wherecode.c | 3 +- src/box/sql/whereexpr.c | 2 +- test/sql-tap/aggnested.test.lua | 10 +- test/sql-tap/cse.test.lua | 6 +- test/sql-tap/e_delete.test.lua | 8 +- test/sql-tap/e_select1.test.lua | 54 +- test/sql-tap/func.test.lua | 2 +- .../gh-3251-string-pattern-comparison.test.lua | 76 +-- test/sql-tap/identifier_case.test.lua | 10 +- test/sql-tap/in1.test.lua | 8 +- test/sql-tap/in3.test.lua | 2 +- test/sql-tap/join5.test.lua | 20 +- test/sql-tap/limit.test.lua | 2 +- test/sql-tap/misc3.test.lua | 2 +- test/sql-tap/resolver01.test.lua | 2 +- test/sql-tap/select1.test.lua | 4 +- test/sql-tap/select2.test.lua | 8 +- test/sql-tap/select4.test.lua | 2 +- test/sql-tap/select5.test.lua | 3 +- test/sql-tap/select6.test.lua | 4 +- test/sql-tap/select9.test.lua | 6 +- test/sql-tap/subquery.test.lua | 4 +- test/sql-tap/tkt2832.test.lua | 2 +- test/sql-tap/tkt3346.test.lua | 2 +- test/sql-tap/tkt3541.test.lua | 2 +- test/sql-tap/whereG.test.lua | 6 +- test/sql/check-clear-ephemeral.result | 2 +- test/sql/gh-2347-max-int-literals.result | 2 +- test/sql/gh-3199-no-mem-leaks.result | 18 +- test/sql/gh-3888-values-blob-assert.result | 2 +- test/sql/persistency.result | 8 +- test/sql/transition.result | 4 +- test/sql/types.result | 605 ++++++++++++++++++++- test/sql/types.test.lua | 132 +++++ 54 files changed, 1362 insertions(+), 463 deletions(-) -- 2.15.1