Files
greptimedb/tests/cases/standalone/common/alter/alter_table.result
dennis zhuang db89235474 feat: only allow timestamp type as time index (#2281)
* feat: only allow timestamp data type as time index

* test: update sqltest cases, todo: need some fixes

* fix: sqlness tests

* fix: forgot adding back cte test

* chore: style
2023-09-12 07:57:15 -05:00

48 lines
1.9 KiB
Plaintext

CREATE TABLE test_alt_table(i INTEGER, j TIMESTAMP TIME INDEX);
Affected Rows: 0
DESC TABLE test_alt_table;
+--------+----------------------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------+----------------------+-----+------+---------+---------------+
| i | Int32 | | YES | | FIELD |
| j | TimestampMillisecond | PRI | NO | | TIMESTAMP |
+--------+----------------------+-----+------+---------+---------------+
ALTER TABLE test_alt_table ADD COLUMN k INTEGER;
Affected Rows: 0
DESC TABLE test_alt_table;
+--------+----------------------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------+----------------------+-----+------+---------+---------------+
| i | Int32 | | YES | | FIELD |
| j | TimestampMillisecond | PRI | NO | | TIMESTAMP |
| k | Int32 | | YES | | FIELD |
+--------+----------------------+-----+------+---------+---------------+
-- SQLNESS ARG restart=true
ALTER TABLE test_alt_table ADD COLUMN m INTEGER;
Affected Rows: 0
DESC TABLE test_alt_table;
+--------+----------------------+-----+------+---------+---------------+
| Column | Type | Key | Null | Default | Semantic Type |
+--------+----------------------+-----+------+---------+---------------+
| i | Int32 | | YES | | FIELD |
| j | TimestampMillisecond | PRI | NO | | TIMESTAMP |
| k | Int32 | | YES | | FIELD |
| m | Int32 | | YES | | FIELD |
+--------+----------------------+-----+------+---------+---------------+
DROP TABLE test_alt_table;
Affected Rows: 1