Files
greptimedb/tests/cases/standalone/common/create/create.result
Ruihang Xia 5d8b0e8154 chore: bump dependencies (#2659)
* fix all hard error

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix nextest

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* trivial changes

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix order by

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix sql keyword and data type

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix range exec's input partitioning

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix cover input type

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix explain analyze

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update distributed mode sqlness result

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix lints

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update locks

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* downgrade dlv-list

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
2023-10-26 12:24:14 +00:00

125 lines
4.4 KiB
Plaintext

CREATE TABLE integers (i BIGINT);
Error: 2000(InvalidSyntax), Missing time index constraint
CREATE TABLE integers (i INT TIME INDEX);
Error: 1004(InvalidArguments), Invalid column option, column name: i, error: time index column data type should be timestamp
CREATE TABLE integers (i TIMESTAMP TIME INDEX NULL);
Error: 1004(InvalidArguments), Invalid column option, column name: i, error: time index column can't be null
CREATE TABLE integers (i TIMESTAMP TIME INDEX, j BIGINT, TIME INDEX(j));
Error: 2000(InvalidSyntax), Invalid time index: expected only one time index constraint but actual 2
CREATE TABLE integers (i TIMESTAMP TIME INDEX, j BIGINT, TIME INDEX(i, j));
Error: 2000(InvalidSyntax), Invalid time index: it should contain only one column in time index
CREATE TABLE integers (i TIMESTAMP TIME INDEX);
Affected Rows: 0
CREATE TABLE times (i TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP());
Affected Rows: 0
CREATE TABLE IF NOT EXISTS integers (i TIMESTAMP TIME INDEX);
Affected Rows: 0
CREATE TABLE test1 (i INTEGER, j INTEGER);
Error: 2000(InvalidSyntax), Missing time index constraint
CREATE TABLE test1 (i INTEGER, j TIMESTAMP TIME INDEX NOT NULL);
Affected Rows: 0
CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX NULL);
Error: 1004(InvalidArguments), Invalid column option, column name: j, error: time index column can't be null
CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX);
Affected Rows: 0
CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX);
Error: 4000(TableAlreadyExists), Table already exists: `greptime.public.test2`
DESC TABLE integers;
+--------+----------------------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------+----------------------+-----+------+---------+---------------+
| i | TimestampMillisecond | PRI | NO | | TIMESTAMP |
+--------+----------------------+-----+------+---------+---------------+
DESC TABLE test1;
+--------+----------------------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------+----------------------+-----+------+---------+---------------+
| i | Int32 | | YES | | FIELD |
| j | TimestampMillisecond | PRI | NO | | TIMESTAMP |
+--------+----------------------+-----+------+---------+---------------+
DESC TABLE test2;
+--------+----------------------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------+----------------------+-----+------+---------+---------------+
| i | Int32 | | YES | | FIELD |
| j | TimestampMillisecond | PRI | NO | | TIMESTAMP |
+--------+----------------------+-----+------+---------+---------------+
DROP TABLE integers;
Affected Rows: 0
DROP TABLE times;
Affected Rows: 0
DROP TABLE test1;
Affected Rows: 0
DROP TABLE test2;
Affected Rows: 0
CREATE TABLE test_pk ("timestamp" TIMESTAMP TIME INDEX, host STRING PRIMARY KEY, "value" DOUBLE);
Affected Rows: 0
DESC TABLE test_pk;
+-----------+----------------------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+-----------+----------------------+-----+------+---------+---------------+
| timestamp | TimestampMillisecond | PRI | NO | | TIMESTAMP |
| host | String | PRI | YES | | TAG |
| value | Float64 | | YES | | FIELD |
+-----------+----------------------+-----+------+---------+---------------+
DROP TABLE test_pk;
Affected Rows: 0
CREATE TABLE test_multiple_pk_definitions ("timestamp" TIMESTAMP TIME INDEX, host STRING PRIMARY KEY, "value" DOUBLE, PRIMARY KEY(host));
Error: 1004(InvalidArguments), Illegal primary keys definition: found definitions of primary keys in multiple places
CREATE TABLE test_multiple_pk_definitions ("timestamp" TIMESTAMP TIME INDEX, host STRING PRIMARY KEY, "value" DOUBLE, PRIMARY KEY(host), PRIMARY KEY(host));
Error: 1004(InvalidArguments), Illegal primary keys definition: found definitions of primary keys in multiple places
CREATE TABLE test_multiple_inline_pk_definitions ("timestamp" TIMESTAMP TIME INDEX, host STRING PRIMARY KEY, "value" DOUBLE PRIMARY KEY);
Error: 1004(InvalidArguments), Illegal primary keys definition: not allowed to inline multiple primary keys in columns options