From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id E7DAE6EC40; Wed, 18 Aug 2021 16:32:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E7DAE6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1629293557; bh=Y+qndfejnb9a3Enl/b9bTjogLDkK++V+PycyHOKe61E=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=V2Sd76j82qePvO4t8hUPfb4Cz7xIN/IOEBf3RBkMMt5TT38kcXBLgRlCWbEzn/Tb4 +9uFgH0zWV10ZGaXa+Od+9jMwOHylP4WXY2HtFVyIu6ykMeaevAca+xF1/DOOeM6k+ 1XTdStwz1mXzc82PKrtI1A3lWbOKFUgDz+hCaYkI= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 751346EC40 for ; Wed, 18 Aug 2021 16:32:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 751346EC40 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mGLgF-0006NG-Pf; Wed, 18 Aug 2021 16:32:32 +0300 Date: Wed, 18 Aug 2021 16:32:30 +0300 To: Safin Timur Message-ID: <20210818133230.GC392133@tarantool.org> References: <20b1ddcb-2cbc-5cad-9036-5c317c9f7c71@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20b1ddcb-2cbc-5cad-9036-5c317c9f7c71@tarantool.org> X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD9BCE6B93DE0C6C3914462CDB1732D383C182A05F538085040D46D1926E14515931A52C045E9373458263C7D5D7B9789D4C963DDB86F1B9EA2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D77100FFB2844417EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A9CECC865C7A6E308638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8742533CBD8A6B6B1DF5A82A07B1C7CFA117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BF1175FABE1C0F9B6A471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CFA80D66F452D417A43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A56E67274E8D86FA69EC4971402D21331C3A8723C60A9E2BFED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA757E10A58996CBD514410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34351729636A02D1DEEE8263F1AA3E6D5C658D8D326839B265C2409767A83EC00AF1007B35DBBC24531D7E09C32AA3244C33E3C0F45AEE73188DDB16D2B4D490201DD47778AE04E04D927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojuRQ/H5n28tqgyemXDvbJOA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DC9E0C35F84F2D6F249DA5305D407EB3C83D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 4/4] sql: introduce decimal to arithmetic X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mergen Imeev via Tarantool-patches Reply-To: Mergen Imeev Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thank you for the review! My answer and diff below. There will be quite big diff, but it is just change of description of one error. On Mon, Aug 16, 2021 at 10:48:40PM +0300, Safin Timur wrote: > > > On 16.08.2021 18:57, Mergen Imeev via Tarantool-patches wrote: > > This patch introduces arithmetic for DECIMAL in SQL. After this patch, > > DECIMAL values can participate in arithmetic along with INTEGER, > > UNSIGNED, DOUBLE, and other DECIMAL values. > > > > Part of #4415 > > --- > > src/box/sql/mem.c | 124 +++++++++++++++++++++++++++++- > > test/sql-tap/decimal.test.lua | 141 +++++++++++++++++++++++++++++++++- > > 2 files changed, 262 insertions(+), 3 deletions(-) > > > > diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c > > index ff8b40d7f..a4ec98f34 100644 > > --- a/src/box/sql/mem.c > > +++ b/src/box/sql/mem.c > > @@ -1733,6 +1733,18 @@ mem_get_int(const struct Mem *mem, int64_t *i, bool > > *is_neg) > > } > > return -1; > > } > > + if (mem->type == MEM_TYPE_DEC) { > > + if (decimal_is_neg(&mem->u.d)) { > > + if (decimal_to_int64(&mem->u.d, i) == NULL) > > + return -1; > > + *is_neg = *i < 0; > > + return 0; > > + } > > + if (decimal_to_uint64(&mem->u.d, (uint64_t *)i) == NULL) > > + return -1; > > + *is_neg = false; > > + return 0; > > + } > > return -1; > > } > > @@ -1760,6 +1772,19 @@ mem_get_uint(const struct Mem *mem, uint64_t *u) > > } > > return -1; > > } > > + if (mem->type == MEM_TYPE_DEC) { > > + if (decimal_is_neg(&mem->u.d)) { > > + int64_t i; > > + if (decimal_to_int64(&mem->u.d, &i) == NULL || i < > > 0) > > + return -1; > > + assert(i == 0); > > + *u = 0; > > + return 0; > > + } > > + if (decimal_to_uint64(&mem->u.d, u) == NULL) > > + return -1; > > + return 0; > > + } > > return -1; > > } > > @@ -1778,6 +1803,10 @@ mem_get_double(const struct Mem *mem, double *d) > > *d = (double)mem->u.u; > > return 0; > > } > > + if (mem->type == MEM_TYPE_DEC) { > > + *d = atof(decimal_str(&mem->u.d)); > > + return 0; > > + } > > 1st question is - was it intentionally that you call here atof, while few > lines belowe we use sqlAtoF? > > 2nd complain is - it all looks that we miss decimal_to_double() function in > src/core/decimal.c (where we do have decimal_from_double() but not the > reverse direction). It will look more consistent if this implementation > would be there. And, I stll believe, there is better way for converting > decimal to double, than converting it to string, and then to double. > > [Though quick navigation over decNumber API didn't reveal the direct > approach. Serge, could you please recommend the easiest way here?] > > I will think about this a bit later, for now I decided to not add additional functions to decimal.c/.h. > > @@ -1946,12 +2003,12 @@ mem_concat(struct Mem *a, struct Mem *b, struct > > Mem *result) > > static inline int > > check_types_numeric_arithmetic(const struct Mem *a, const struct Mem *b) > > { > > - if (!mem_is_num(a) || mem_is_metatype(a) || a->type == > > MEM_TYPE_DEC) { > > + if (!mem_is_num(a) || mem_is_metatype(a)) { > > And now it looks better than before, and less confusing, I do not have > complains here anymore... > > > > diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(a), > > "integer, unsigned or double"); > > return -1; > > } > > - if (!mem_is_num(b) || mem_is_metatype(b) || b->type == > > MEM_TYPE_DEC) { > > + if (!mem_is_num(b) || mem_is_metatype(b)) { > > And here. > > > diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(b), > > "integer, unsigned or double"); > > return -1; > > Thanks, > Timur Diff: diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c index 077a8b51e..74febd182 100644 --- a/src/box/sql/mem.c +++ b/src/box/sql/mem.c @@ -2005,12 +2005,12 @@ check_types_numeric_arithmetic(const struct Mem *a, const struct Mem *b) { if (!mem_is_num(a) || mem_is_metatype(a)) { diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(a), - "integer, unsigned or double"); + "integer, decimal or double"); return -1; } if (!mem_is_num(b) || mem_is_metatype(b)) { diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(b), - "integer, unsigned or double"); + "integer, decimal or double"); return -1; } return 0; diff --git a/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua b/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua index 3e4de6860..390a2d9b2 100755 --- a/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua +++ b/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua @@ -35,7 +35,7 @@ test:do_catchsql_test( [[ SELECT 9 + '2'; ]], { - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" }) test:do_catchsql_test( @@ -43,7 +43,7 @@ test:do_catchsql_test( [[ SELECT 9 + x'32'; ]], { - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" }) test:do_catchsql_test( @@ -51,7 +51,7 @@ test:do_catchsql_test( [[ SELECT 9 + true; ]], { - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" }) test:do_catchsql_test( @@ -60,7 +60,7 @@ test:do_catchsql_test( SELECT 9 + CAST('11111111-1111-1111-1111-111111111111' AS UUID); ]], { 1, "Type mismatch: can not convert ".. - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_execsql_test( @@ -92,7 +92,7 @@ test:do_catchsql_test( [[ SELECT 9 - '2'; ]], { - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" }) test:do_catchsql_test( @@ -100,7 +100,7 @@ test:do_catchsql_test( [[ SELECT 9 - x'32'; ]], { - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" }) test:do_catchsql_test( @@ -108,7 +108,7 @@ test:do_catchsql_test( [[ SELECT 9 - true; ]], { - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" }) test:do_catchsql_test( @@ -117,7 +117,7 @@ test:do_catchsql_test( SELECT 9 - CAST('11111111-1111-1111-1111-111111111111' AS UUID); ]], { 1, "Type mismatch: can not convert ".. - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_execsql_test( @@ -149,7 +149,7 @@ test:do_catchsql_test( [[ SELECT 9 * '2'; ]], { - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" }) test:do_catchsql_test( @@ -157,7 +157,7 @@ test:do_catchsql_test( [[ SELECT 9 * x'32'; ]], { - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" }) test:do_catchsql_test( @@ -165,7 +165,7 @@ test:do_catchsql_test( [[ SELECT 9 * true; ]], { - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" }) test:do_catchsql_test( @@ -174,7 +174,7 @@ test:do_catchsql_test( SELECT 9 * CAST('11111111-1111-1111-1111-111111111111' AS UUID); ]], { 1, "Type mismatch: can not convert ".. - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_execsql_test( @@ -206,7 +206,7 @@ test:do_catchsql_test( [[ SELECT 9 / '2'; ]], { - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" }) test:do_catchsql_test( @@ -214,7 +214,7 @@ test:do_catchsql_test( [[ SELECT 9 / x'32'; ]], { - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" }) test:do_catchsql_test( @@ -222,7 +222,7 @@ test:do_catchsql_test( [[ SELECT 9 / true; ]], { - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" }) test:do_catchsql_test( @@ -231,7 +231,7 @@ test:do_catchsql_test( SELECT 9 / CAST('11111111-1111-1111-1111-111111111111' AS UUID); ]], { 1, "Type mismatch: can not convert ".. - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_execsql_test( diff --git a/test/sql-tap/metatypes.test.lua b/test/sql-tap/metatypes.test.lua index 349c670ba..3e4091675 100755 --- a/test/sql-tap/metatypes.test.lua +++ b/test/sql-tap/metatypes.test.lua @@ -96,7 +96,7 @@ test:do_catchsql_test( [[ SELECT 1 + CAST(1 AS NUMBER); ]], { - 1, "Type mismatch: can not convert number(1) to integer, unsigned or double" + 1, "Type mismatch: can not convert number(1) to integer, decimal or double" }) test:do_catchsql_test( @@ -104,7 +104,7 @@ test:do_catchsql_test( [[ SELECT CAST(1 AS SCALAR) * 1; ]], { - 1, "Type mismatch: can not convert scalar(1) to integer, unsigned or double" + 1, "Type mismatch: can not convert scalar(1) to integer, decimal or double" }) -- Check that bitwise operations are prohibited for NUMBER and SCALAR values. diff --git a/test/sql-tap/sql-errors.test.lua b/test/sql-tap/sql-errors.test.lua index daf0ee643..ceb4ecccf 100755 --- a/test/sql-tap/sql-errors.test.lua +++ b/test/sql-tap/sql-errors.test.lua @@ -696,7 +696,7 @@ test:do_catchsql_test( SELECT X'ff' + 1; ]], { -- - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" -- }) @@ -706,7 +706,7 @@ test:do_catchsql_test( SELECT X'ff' - 1; ]], { -- - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" -- }) @@ -716,7 +716,7 @@ test:do_catchsql_test( SELECT X'ff' * 1; ]], { -- - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" -- }) @@ -726,7 +726,7 @@ test:do_catchsql_test( SELECT X'ff' / 1; ]], { -- - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" -- }) diff --git a/test/sql-tap/tkt-a8a0d2996a.test.lua b/test/sql-tap/tkt-a8a0d2996a.test.lua index 72f57ec65..a40621f41 100755 --- a/test/sql-tap/tkt-a8a0d2996a.test.lua +++ b/test/sql-tap/tkt-a8a0d2996a.test.lua @@ -27,7 +27,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x+0 AND y=='1'; ]], { -- <1.0> - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" -- }) @@ -37,7 +37,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x-0 AND y=='1'; ]], { -- <1.1> - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" -- }) @@ -47,7 +47,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x*1 AND y=='1'; ]], { -- <1.2> - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" -- }) @@ -57,7 +57,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x/1 AND y=='1'; ]], { -- <1.3> - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" -- }) @@ -78,7 +78,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x+0 AND y=='1'; ]], { -- <3.0> - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" -- }) @@ -88,7 +88,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x-0 AND y=='1'; ]], { -- <3.1> - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" -- }) @@ -98,7 +98,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x*1 AND y=='1'; ]], { -- <3.2> - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" -- }) @@ -108,7 +108,7 @@ test:do_catchsql_test( SELECT typeof(x), typeof(y) FROM t WHERE 1=x/1 AND y=='1'; ]], { -- <3.3> - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" -- }) @@ -138,7 +138,7 @@ test:do_catchsql_test( SELECT '1.23e64'/'1.0000e+62'; ]], { -- <4.1> - 1, "Type mismatch: can not convert string('1.0000e+62') to integer, unsigned or double" + 1, "Type mismatch: can not convert string('1.0000e+62') to integer, decimal or double" -- }) diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua index 57e638046..177798cfa 100755 --- a/test/sql-tap/uuid.test.lua +++ b/test/sql-tap/uuid.test.lua @@ -957,7 +957,7 @@ test:do_catchsql_test( [[ SELECT -u FROM t2; ]], { - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_catchsql_test( @@ -965,7 +965,7 @@ test:do_catchsql_test( [[ SELECT u + 1 FROM t2; ]], { - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_catchsql_test( @@ -973,7 +973,7 @@ test:do_catchsql_test( [[ SELECT u - 1 FROM t2; ]], { - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_catchsql_test( @@ -981,7 +981,7 @@ test:do_catchsql_test( [[ SELECT u * 1 FROM t2; ]], { - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_catchsql_test( @@ -989,7 +989,7 @@ test:do_catchsql_test( [[ SELECT u / 1 FROM t2; ]], { - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" }) test:do_catchsql_test( diff --git a/test/sql/boolean.result b/test/sql/boolean.result index a9ce37e11..000142ebe 100644 --- a/test/sql/boolean.result +++ b/test/sql/boolean.result @@ -1131,98 +1131,98 @@ SELECT a, a1, a OR a1 FROM t, t6; SELECT -true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT -false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT -a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true + true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT true + false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT false + true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false + false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true - true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT true - false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT false - true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false - false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true * true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT true * false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT false * true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false * false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true / true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT true / false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT false / true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false / false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true % true; | --- @@ -1248,42 +1248,42 @@ SELECT false % false; SELECT a, true + a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, false + a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, true - a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, false - a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, true * a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, false * a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, true / a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, false / a FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, true % a FROM t; | --- @@ -1298,42 +1298,42 @@ SELECT a, false % a FROM t; SELECT a, a + true FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a, a + false FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a - true FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a, a - false FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a * true FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a, a * false FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a / true FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a, a / false FROM t; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a % true FROM t; | --- @@ -1349,22 +1349,22 @@ SELECT a, a % false FROM t; SELECT a, a1, a + a1 FROM t, t6; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a1, a - a1 FROM t, t6; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a1, a * a1 FROM t, t6; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a1, a / a1 FROM t, t6; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a, a1, a % a1 FROM t, t6; | --- @@ -2652,42 +2652,42 @@ SELECT a2, b, b OR a2 FROM t6, t7; SELECT true + 2; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false + 2; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true - 2; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false - 2; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true * 2; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false * 2; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true / 2; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false / 2; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true % 2; | --- @@ -2702,42 +2702,42 @@ SELECT false % 2; SELECT 2 + true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2 + false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2 - true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2 - false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2 * true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2 * false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2 / true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2 / false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2 % true; | --- @@ -2753,22 +2753,22 @@ SELECT 2 % false; SELECT a1, a1 + 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 - 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 * 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 / 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 % 2 FROM t6 | --- @@ -2778,22 +2778,22 @@ SELECT a1, a1 % 2 FROM t6 SELECT a1, 2 + a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2 - a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2 * a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2 / a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2 % a1 FROM t6 | --- @@ -2803,22 +2803,22 @@ SELECT a1, 2 % a1 FROM t6 SELECT a2, a2 + 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 - 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 * 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 / 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 % 2 FROM t6 | --- @@ -2828,22 +2828,22 @@ SELECT a2, a2 % 2 FROM t6 SELECT a2, 2 + a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2 - a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2 * a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2 / a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2 % a2 FROM t6 | --- @@ -2854,42 +2854,42 @@ SELECT a2, 2 % a2 FROM t6 SELECT b, true + b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, false + b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, true - b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, false - b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, true * b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, false * b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, true / b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, false / b FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, true % b FROM t7; | --- @@ -2904,42 +2904,42 @@ SELECT b, false % b FROM t7; SELECT b, b + true FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, b + false FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, b - true FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, b - false FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, b * true FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, b * false FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, b / true FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT b, b / false FROM t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT b, b % true FROM t7; | --- @@ -2955,22 +2955,22 @@ SELECT b, b % false FROM t7; SELECT a1, b, a1 + b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, a1 - b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, a1 * b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, a1 / b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, a1 % b FROM t6, t7; | --- @@ -2980,22 +2980,22 @@ SELECT a1, b, a1 % b FROM t6, t7; SELECT a1, b, b + a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, b - a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, b * a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, b / a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, b, b % a1 FROM t6, t7; | --- @@ -3005,22 +3005,22 @@ SELECT a1, b, b % a1 FROM t6, t7; SELECT a2, b, a2 + b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, a2 - b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, a2 * b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, a2 / b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, a2 % b FROM t6, t7; | --- @@ -3030,22 +3030,22 @@ SELECT a2, b, a2 % b FROM t6, t7; SELECT a2, b, b + a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, b - a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, b * a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, b / a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, b, b % a2 FROM t6, t7; | --- @@ -4121,42 +4121,42 @@ SELECT a2, c, c OR a2 FROM t6, t8; SELECT true + 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false + 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true - 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false - 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true * 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false * 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true / 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT false / 2.3; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT true % 2.3; | --- @@ -4171,42 +4171,42 @@ SELECT false % 2.3; SELECT 2.3 + true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2.3 + false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2.3 - true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2.3 - false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2.3 * true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2.3 * false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2.3 / true; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT 2.3 / false; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT 2.3 % true; | --- @@ -4222,22 +4222,22 @@ SELECT 2.3 % false; SELECT a1, a1 + 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 - 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 * 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 / 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, a1 % 2.3 FROM t6 | --- @@ -4247,22 +4247,22 @@ SELECT a1, a1 % 2.3 FROM t6 SELECT a1, 2.3 + a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2.3 - a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2.3 * a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2.3 / a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, 2.3 % a1 FROM t6 | --- @@ -4272,22 +4272,22 @@ SELECT a1, 2.3 % a1 FROM t6 SELECT a2, a2 + 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 - 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 * 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 / 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, a2 % 2.3 FROM t6 | --- @@ -4297,22 +4297,22 @@ SELECT a2, a2 % 2.3 FROM t6 SELECT a2, 2.3 + a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2.3 - a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2.3 * a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2.3 / a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, 2.3 % a2 FROM t6 | --- @@ -4323,42 +4323,42 @@ SELECT a2, 2.3 % a2 FROM t6 SELECT c, true + c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, false + c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, true - c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, false - c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, true * c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, false * c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, true / c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, false / c FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, true % c FROM t8; | --- @@ -4373,42 +4373,42 @@ SELECT c, false % c FROM t8; SELECT c, c + true FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, c + false FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, c - true FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, c - false FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, c * true FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, c * false FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, c / true FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT c, c / false FROM t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT c, c % true FROM t8; | --- @@ -4424,22 +4424,22 @@ SELECT c, c % false FROM t8; SELECT a1, c, a1 + c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, a1 - c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, a1 * c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, a1 / c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, a1 % c FROM t6, t8; | --- @@ -4449,22 +4449,22 @@ SELECT a1, c, a1 % c FROM t6, t8; SELECT a1, c, c + a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, c - a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, c * a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, c / a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' | ... SELECT a1, c, c % a1 FROM t6, t8; | --- @@ -4474,22 +4474,22 @@ SELECT a1, c, c % a1 FROM t6, t8; SELECT a2, c, a2 + c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, a2 - c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, a2 * c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, a2 / c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, a2 % c FROM t6, t8; | --- @@ -4499,22 +4499,22 @@ SELECT a2, c, a2 % c FROM t6, t8; SELECT a2, c, c + a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, c - a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, c * a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, c / a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' | ... SELECT a2, c, c % a2 FROM t6, t8; | --- diff --git a/test/sql/types.result b/test/sql/types.result index 68bdcd62e..4d49318c9 100644 --- a/test/sql/types.result +++ b/test/sql/types.result @@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1.1;') box.execute('SELECT \'9223372036854\' + 1;') --- - null -- 'Type mismatch: can not convert string(''9223372036854'') to integer, unsigned or +- 'Type mismatch: can not convert string(''9223372036854'') to integer, decimal or double' ... -- Fix BOOLEAN bindings.