SQL features
This section compares Tarantool's features with SQL:2016's "Feature taxonomy and definition for mandatory features".
For each feature in that list, there is a simple example SQL statement. If Tarantool appears to handle the example, it is marked "OK", otherwise it is marked "No".
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E011-01 | INTEGER and SMALLINT |
| OK. |
E011-02 | REAL, DOUBLE PRECISION, and FLOAT data types |
| No. Tarantool's floating point data type is DOUBLE. Note: Floating point SQL types are not planned to be compatible between 2.1 and 2.2 releases. The reason is that in 2.1 we set 'number' format for columns of these types, but will restrict it to 'float32' and 'float64' in 2.2. The format change requires data migration and cannot be done automatically, because in 2.1 we have no information to distinguish 'number' columns (created from Lua) from FLOAT/DOUBLE/REAL ones (created from SQL). |
E011-03 | DECIMAL and NUMERIC data types |
| No, NUMERIC data types are not supported, although the DECIMAL data type is supported. |
E011-04 | Arithmetic operators |
| OK. |
E011-05 | Numeric comparisons |
| OK. |
E011-06 | Implicit casting among the numeric data types |
| OK, because Tarantool allows comparison of 1.00 with an INTEGER column. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E021-01 | Character data type (including all its spellings) |
| No, CHAR is not supported. This type of unsupported features will only be counted once. |
E021-02 | CHARACTER VARYING data type (including all its spellings) |
| No, Tarantool only allows VARCHAR(n), which is a synonym for STRING. |
E021-03 | Character literals |
| OK, and the bad practice of accepting |
E021-04 | CHARACTER_LENGTH function |
| OK. Tarantool treats this as a synonym of LENGTH(). |
E021-05 | OCTET_LENGTH |
| No. There is no such function. |
E021-06 | SUBSTRING function |
| No. There is no such function. There is a function SUBSTR(x,n,n), which is OK. |
E021-07 | Character concatenation |
| OK. |
E021-08 | UPPER and LOWER functions |
| |
E021-09 | TRIM function |
| OK. |
E021-10 | Implicit casting among the fixed-length and variable-length character string types |
| No, there is no fixed-length character string type. |
E021-11 | POSITION function |
| No. Tarantool's POSITION function requires ' |
E021-12 | Character comparison |
| OK. We should note here that comparisons use a binary collation by default, but it is easy to use a COLLATE clause. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E031 | Identifiers |
| No. Tarantool's list of reserved words differs from the standard's list of reserved words. |
E031-01 | Delimited identifiers |
| OK. Also, enclosing identifiers inside double quotes means they won't be converted to upper case or lower case, this is the behavior that some other DBMSs lack. |
E031-02 | Lower case identifiers |
| OK. |
E031-03 | Trailing underscore |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E051-01 | SELECT DISTINCT |
| OK. |
E051-02 | GROUP BY clause |
| OK. |
E051-04 | GROUP BY can contain columns not in select list |
| OK. |
E051-05 | Select list items can be renamed |
| OK. |
E051-06 | HAVING clause |
| OK. Tarantool supports HAVING, and GROUP BY is not mandatory before HAVING. |
E051-07 | Qualified * in SELECT list |
| OK. |
E051-08 | Correlation names in the FROM clause |
| OK. |
E051-09 | Rename columns in the FROM clause |
| No. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E061-01 | Comparison predicate |
| OK. |
E061-02 | BETWEEN predicate |
| OK. |
E061-03 | IN predicate with list of values |
| OK. |
E061-04 | LIKE predicate |
| OK. |
E061-05
LIKE predicate: |
| OK. | E061-06 |
NULL predicate |
| OK. | E061-07 |
Quantified comparison predicate |
| No. Syntax error. | E061-08 |
EXISTS predicate |
| OK. | E061-09 |
Subqueries in comparison predicate |
| OK. | E061-11 |
Subqueries in IN predicate |
| OK. | E061-12 |
Subqueries in quantified comparison predicate |
| No. Syntax error. | E061-13 |
Correlated subqueries |
| OK. | E061-14 |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E071-01 | UNION DISTINCT table operator |
| No. However, |
E071-02 | UNION ALL table operator |
| OK. |
E071-03 | EXCEPT DISTINCT table operator |
| No. However, |
E071-05 | Columns combined via table operators need not have exactly the same data type |
| OK. |
E071-06 | Table operators in subqueries |
| OK. |
Tarantool doesn't support privileges except via NoSQL.
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E091-01 | AVG |
| No. Tarantool supports AVG but there is no warning that NULLs are eliminated. |
E091-02 | COUNT |
| OK. |
E091-03 | MAX |
| OK. |
E091-04 | MIN |
| OK. |
E091-05 | SUM |
| OK. |
E091-06 | ALL quantifier |
| OK. |
E091-07 | DISTINCT quantifier |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E111 | Single row SELECT statement |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E121-01 | DECLARE CURSOR | No. Tarantool doesn't support cursors. | E121-02 |
ORDER BY columns need not be in select list |
| OK. | E121-03 |
Value expressions in ORDER BY clause |
| OK. | E121-04 |
OPEN statement | No. Tarantool doesn't support cursors. | E121-06 | Positioned UPDATE statement |
No. Tarantool doesn't support cursors. | E121-07 | Positioned DELETE statement | No. Tarantool doesn't support cursors. |
E121-08 | CLOSE statement | No. Tarantool doesn't support cursors. | E121-10 |
FETCH statement implicit next | No. Tarantool doesn't support cursors. | E121-17 | WITH HOLD cursors |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E131 | Null value support (nulls in lieu of values) |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E141-01 | NOT NULL constraints |
| OK. |
E141-02 | UNIQUE constraints of NOT NULL columns |
| OK. |
E141-03 | PRIMARY KEY constraints |
| OK, although Tarantool shouldn't always insist on having a primary key. |
E141-04 | Basic FOREIGN KEY constraint with the NO ACTION default for both referential delete and referential update actions |
| OK. |
E141-06 | CHECK constraints |
| OK. |
E141-07 | Column defaults |
| OK. |
E141-08 | NOT NULL inferred on primary key |
| OK. We are unable to insert NULL although we don't explicitly say the column is NOT NULL. |
E141-10 | Names in a foreign key can be specified in any order |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E151-01 | COMMIT statement |
| No. Tarantool supports COMMIT but it is necessary to say START TRANSACTION first. |
E151-02 | ROLLBACK statement |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E152-01
SET TRANSACTION statement: |
| No. Syntax error. | E152-02
SET TRANSACTION statement: |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
E153 | Updatable queries with subqueries |
| No. |
E161 | SQL comments using leading double minus |
| OK. |
E171 | SQLSTATE support |
| No. Tarantool returns an error message but not an SQLSTATE string. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F021 | Basic information schema |
| No. Tarantool's metadata is not in a schema with that name (not counted in the final score). |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F031-01 | CREATE TABLE statement to create persistent base tables |
| No. We always have to specify PRIMARY KEY (we only count this flaw once). |
F031-02 | CREATE VIEW statement |
| OK. |
F031-03 | GRANT statement | No. Tarantool doesn't support privileges except via NoSQL. | F031-04
ALTER TABLE statement: |
| OK. Tarantool supports ALTER TABLE, and support for ADD COLUMN was added in Tarantool 2.7. | F031-13
DROP TABLE statement: |
|
No. Tarantool supports DROP TABLE but not this clause. | F031-16
DROP VIEW statement: |
| No. Tarantool supports DROP VIEW but not this clause. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F041-01 | Inner join but not necessarily the INNER keyword |
| OK. |
F041-02 | INNER keyword |
| OK. |
F041-03 | LEFT OUTER JOIN |
| OK. |
F041-04 | RIGHT OUTER JOIN |
| No. Syntax error. |
F041-05 | Outer joins can be nested |
| OK. |
F041-07 | The inner table in a left or right outer join can also be used in an inner join |
| OK. |
F041-08 | All comparison operators are supported |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F051-01 | DATE data type (including support of DATE literal) |
| No. Tarantool does not support the DATE data type. |
F051-02 | TIME data type (including support of TIME literal) |
| No. Syntax error. |
F051-03 | TIMESTAMP data type (including support of TIMESTAMP literal) |
| No. Syntax error. |
F051-04 | Comparison predicate on DATE, TIME and TIMESTAMP data types |
| No. Date and time data types are not supported. |
F051-05 | Explicit CAST between date-time types and character string types |
| No. Date and time data types are not supported. |
F051-06 | CURRENT_DATE |
| No. Syntax error. |
F051-07 | LOCALTIME |
| No. Syntax error. |
F051-08 | LOCALTIMESTAMP |
| No. Syntax error. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F081 | UNION and EXCEPT in views |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F131-01 | WHERE, GROUP BY, and HAVING clauses supported in queries with grouped views |
| OK. |
F131-02 | Multiple tables supported in queries with grouped views |
| OK. |
F131-03 | Set functions supported in queries with grouped views |
| OK. |
F131-04 | Subqueries with GROUP BY and HAVING clauses and grouped views |
| OK. |
F131-05 | Single row SELECT with GROUP BY and HAVING clauses and grouped views |
| OK. |
No. Tarantool doesn't have modules.
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F201 | CAST function |
| OK. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F221 | Explicit defaults |
| No. Syntax error. |
Feature ID | Feature | Tests |
|---|---|---|
F311-01 | CREATE SCHEMA | No. Tarantool doesn't have schemas or databases. |
F311-02 | CREATE TABLE for persistent base tables | No. Tarantool doesn't have CREATE TABLE inside CREATE SCHEMA. |
F311-03 | CREATE VIEW | No. Tarantool doesn't have CREATE VIEW inside CREATE SCHEMA. |
F311-04
CREATE VIEW: | No. Tarantool doesn't have CREATE VIEW inside CREATE SCHEMA. | F311-05 |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
F471 | Scalar subquery values |
| OK. |
F481 | Expanded NULL predicate |
| No. Syntax error. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
S011 | Distinct types |
| No. Tarantool doesn't support distinct types. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
T321-01 | User-defined functions with no overloading |
| No. User-defined functions for SQL are created in Lua with a different syntax. |
T321-02 | User-defined procedures with no overloading |
| No. User-defined functions for SQL are created in Lua with a different syntax. |
T321-03 | Function invocation |
| OK. Tarantool can invoke Lua user-defined functions. |
T321-04 | CALL statement |
| No. Tarantool doesn't support CALL statements. |
T321-05 | RETURN statement |
| No. Tarantool doesn't support RETURN statements. |
Feature ID | Feature | Example | Tests |
|---|---|---|---|
T631 | IN predicate with one list element |
| OK. |
Total number of items marked "No": 67
Total number of items marked "OK": 79