@@ -289,7 +289,7 @@ The detailed description of data types is in the section
289
289
Column definition -- the rules for the SCALAR data type
290
290
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
291
291
292
- The rules for the SCALAR data type were significantly changed in Tarantool version 2.10.1 .
292
+ The rules for the SCALAR data type were significantly changed in Tarantool version :tarantool-release: ` 2.10.0-beta1 ` .
293
293
294
294
SCALAR is a "complex" data type, unlike all the other data types which are "primitive".
295
295
Two column values in a SCALAR column can have two different primitive data types.
@@ -348,14 +348,14 @@ Two column values in a SCALAR column can have two different primitive data types
348
348
The comparison is valid, because Tarantool knows the ordering of X'41' and 'a'
349
349
in Tarantool/NoSQL 'scalar' -- this is a case where the primitive type matters.
350
350
#. The result data type of :ref: `min/max <sql_aggregate >` operation on a column defined as SCALAR
351
- is the data type of the minimum/maximum operand, unless the result value
352
- is NULL . For example:
351
+ is SCALAR.
352
+ Users will need to know the underlying primitive type of the result in advance . For example:
353
353
354
354
.. code-block :: sql
355
355
356
356
CREATE TABLE t (s1 INTEGER, s2 SCALAR PRIMARY KEY);
357
357
INSERT INTO t VALUES (1, X'44'), (2, 11), (3, 1E4), (4, 'a');
358
- SELECT min(s2), hex(max(s2)) FROM t;
358
+ SELECT cast( min(s2) AS INTEGER) , hex(cast( max(s2) as VARBINARY )) FROM t;
359
359
360
360
The result is: ``- - [11, '44',] ``
361
361
@@ -3265,7 +3265,7 @@ Syntax:
3265
3265
3266
3266
Return the hexadecimal code for each byte in **expression **.
3267
3267
3268
- Starting with Tarantool version 2.10.1 , the expression must be a byte sequence
3268
+ Starting with Tarantool version 2.10.0 , the expression must be a byte sequence
3269
3269
(data type VARBINARY).
3270
3270
3271
3271
In earlier versions of Tarantool, the expression could be either a string or a byte sequence.
0 commit comments