mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-13 08:43:00 +00:00
* feat: impl interval type in common time
* feat: impl datatype, vectors, value for interval
pick 0c1d9f297 feat: impl interval type in common time
pick d528c647f feat: impl datatype, vectors, value for interval
pick 1e12dd5c7 comments update
pick 74103e36c add license header
* comments update
* add license header
* cargo clippy
* refactor interval type
* add unit test and case to dummy.sql
* cargo clippy
* chore: add doc comments
* chore: cargo fmt
* feat: add formats, refactor comparison
* add docs comments
* Apply suggestions from code review
Co-authored-by: Yingwen <realevenyag@gmail.com>
* chore: cr comment
---------
Co-authored-by: Yingwen <realevenyag@gmail.com>
38 lines
684 B
SQL
38 lines
684 B
SQL
select 1;
|
|
|
|
select 2 + 3;
|
|
|
|
select 4 + 0.5;
|
|
|
|
select "a";
|
|
|
|
select "A";
|
|
|
|
select * where "a" = "A";
|
|
|
|
select TO_UNIXTIME('2023-03-01T06:35:02Z');
|
|
|
|
select TO_UNIXTIME(2);
|
|
|
|
create table test_unixtime(a int, b timestamp time index);
|
|
|
|
DESC TABLE test_unixtime;
|
|
|
|
insert into test_unixtime values(27, 27);
|
|
|
|
select * from test_unixtime;
|
|
|
|
select a from test_unixtime;
|
|
|
|
select b from test_unixtime;
|
|
|
|
select TO_UNIXTIME(b) from test_unixtime;
|
|
|
|
DROP TABLE test_unixtime;
|
|
|
|
select INTERVAL '1 year 2 months 3 days 4 hours 5 minutes 6 seconds 100 microseconds';
|
|
|
|
select INTERVAL '1 year 2 months 3 days 4 hours' + INTERVAL '1 year';
|
|
|
|
select INTERVAL '1 year 2 months 3 days 4 hours' - INTERVAL '1 year';
|