[Tarantool-patches] [PATCH v1 4/4] sql: introduce decimal to arithmetic

Mergen Imeev imeevma at tarantool.org
Wed Aug 18 16:32:30 MSK 2021


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;
 	]], {
 		-- <sql-errors-2.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"
 		-- </sql-errors-2.1>
 	})
 
@@ -706,7 +706,7 @@ test:do_catchsql_test(
 		SELECT X'ff' - 1;
 	]], {
 		-- <sql-errors-2.2>
-		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"
 		-- </sql-errors-2.2>
 	})
 
@@ -716,7 +716,7 @@ test:do_catchsql_test(
 		SELECT X'ff' * 1;
 	]], {
 		-- <sql-errors-2.3>
-		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"
 		-- </sql-errors-2.3>
 	})
 
@@ -726,7 +726,7 @@ test:do_catchsql_test(
 		SELECT X'ff' / 1;
 	]], {
 		-- <sql-errors-2.4>
-		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"
 		-- </sql-errors-2.4>
 	})
 
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"
         -- </1.0>
     })
 
@@ -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"
         -- </1.1>
     })
 
@@ -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"
         -- </1.2>
     })
 
@@ -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"
         -- </1.3>
     })
 
@@ -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"
         -- </3.0>
     })
 
@@ -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"
         -- </3.1>
     })
 
@@ -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"
         -- </3.2>
     })
 
@@ -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"
         -- </3.3>
     })
 
@@ -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"
         -- </4.1>
     })
 
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.


More information about the Tarantool-patches mailing list