mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-07 22:02:56 +00:00
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
This commit is contained in:
committed by
Ruihang Xia
parent
6e593401f7
commit
db89235474
@@ -1,4 +1,4 @@
|
||||
CREATE TABLE test1 (i INTEGER, j BIGINT TIME INDEX, k STRING DEFAULT 'blabla');
|
||||
CREATE TABLE test1 (i INTEGER, j TIMESTAMP TIME INDEX, k STRING DEFAULT 'blabla');
|
||||
|
||||
INSERT INTO test1 VALUES (DEFAULT);
|
||||
|
||||
@@ -10,7 +10,7 @@ INSERT INTO test1 VALUES (DEFAULT, 1, DEFAULT), (default, 2, default), (DeFaUlT,
|
||||
|
||||
SELECT * FROM test1;
|
||||
|
||||
CREATE TABLE test2 (i INTEGER, j BIGINT TIME INDEX DEFAULT CURRENT_TIMESTAMP, k STRING DEFAULT 'blabla');
|
||||
CREATE TABLE test2 (i INTEGER, j TIMESTAMP TIME INDEX DEFAULT CURRENT_TIMESTAMP, k STRING DEFAULT 'blabla');
|
||||
|
||||
INSERT INTO test2 VALUES (1,1,'a'), (default, 2, default), (3,3,'b'), (default, 4, default), (5, 5, 'c');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user