Skip to content

Commit af60322

Browse files
committed
Fixes gh-2206 Behavior changes in SQL, sixth commit
1 parent 6e7b35c commit af60322

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

doc/reference/reference_sql/sql_statements_and_clauses.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ Two column values in a SCALAR column can have two different primitive data types
367367
uses it for section "Result of data type combinations".) Therefore for
368368
``greatest(1E308, 'a', 0, X'00')`` the result is X'00' but
369369
``typeof(greatest(1E308, 'a', 0, X'00')`` is 'scalar'.
370-
* The union of two SCALARs is sometimes the primitive type.
371-
For example, ``SELECT TYPEOF((SELECT CAST('a' AS SCALAR) UNION SELECT CAST('a' AS SCALAR)));``
372-
returns 'string'.
370+
#. The union of two SCALARs is sometimes the primitive type.
371+
For example, ``SELECT TYPEOF((SELECT CAST('a' AS SCALAR) UNION SELECT CAST('a' AS SCALAR)));``
372+
returns 'string'.
373373

374374
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
375375
Column definition -- relation to NoSQL
@@ -3887,14 +3887,14 @@ that can appear in :ref:`box.execute(...[,extra-parameters]) <box-sql_box_execut
38873887
requests,
38883888
default data type is calculated thus: |br|
38893889
* When there is only one possible data type, it is default. |br|
3890-
Example: ``box.execute([[SELECT TYPEOF(LOWER(?);]]),{x})`` is 'string'. |br|
3890+
Example: ``box.execute([[SELECT TYPEOF(LOWER(?));]],{x})`` is 'string'. |br|
38913891
* When possible data types are INTEGER or DOUBLE or DECIMAL, DECIMAL is default. |br|
3892-
Example: ``box.execute([[SELECT TYPEOF(AVG(?);]]),{x})`` is 'decimal'. |br|
3892+
Example: ``box.execute([[SELECT TYPEOF(AVG(?));]],{x})`` is 'decimal'. |br|
38933893
* When possible data types are STRING or VARBINARY, STRING is default. |br|
3894-
Example: ``box.execute([[SELECT TYPEOF(LENGTH(?);]]),{x})`` is 'string'. |br|
3894+
Example: ``box.execute([[SELECT TYPEOF(LENGTH(?));]],{x})`` is 'string'. |br|
38953895
* When possible data types are any other scalar data type, SCALAR is default. |br|
3896-
Example: ``box.execute([[SELECT TYPEOF(GREATEST(?,5);]]),{x})`` is 'scalar'. |br|
3896+
Example: ``box.execute([[SELECT TYPEOF(GREATEST(?,5));]],{x})`` is 'scalar'. |br|
38973897
* Otherwise, there is no default. |br|
3898-
Example: ``box.execute([[SELECT TYPEOF(LIKELY(?);]]),{x})`` is unknown.
3898+
Example: ``box.execute([[SELECT TYPEOF(LIKELY(?));]],{x})`` is the name of one of the primitive data types.
38993899

39003900

doc/reference/reference_sql/sql_user_guide.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,14 +497,12 @@ as -inf or inf.
497497
.. _sql_data_type_number:
498498

499499
NUMBER values have the same range as DOUBLE values.
500-
But NUMBER values may also also be integers, and, if so,
501-
arithmetic operation results will be exact rather than approximate.
502-
For example, if a NUMBER column ``X`` contains 5, then ``X / 2`` would be 2 if division is legal.
500+
But NUMBER values may also be integers.
503501
There is no literal format for NUMBER (literals like ``1.5`` or ``1E555``
504502
are considered to be DOUBLEs), so use :ref:`CAST <sql_function_cast>`
505503
to insist that a numeric has data type NUMBER, but that is rarely necessary.
506504
See the description of NoSQL type :ref:`'number' <index-box_number>`.
507-
Support for arithmetic and built-in functions with NUMBERs was removed in Tarantool version 2.10.1.
505+
Support for arithmetic and built-in arithmetic functions with NUMBERs was removed in Tarantool version 2.10.1.
508506

509507
.. _sql_data_type_decimal:
510508

0 commit comments

Comments
 (0)