You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATETABLEmonitor (
host STRING,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP() TIME INDEX,
cpu FLOAT64 DEFAULT 0,
memory FLOAT64,
PRIMARY KEY(host)) ENGINE=mito;
INSERT INTO monitor
VALUES
("127.0.0.1", 1, 0.5, 0.9),
("127.0.0.2", 2, 0.6, 0.8),
("127.0.0.3", 3, 0.7, 0.7),
("127.0.0.4", 4, 0.8, 0.6),
("127.0.0.4", 5, 0.9, 0.5),
("127.0.0.5", 6, 1.0, 0.4);
select last_value(cpu order by ts) from monitor;
select first_value(cpu order by ts) from monitor;
What did you expect to see?
select last_value(cpu order by ts) from monitor;
+--------------------------------------------------------------+
| last_value(monitor.cpu) ORDER BY [monitor.ts ASC NULLS LAST] |
+--------------------------------------------------------------+
| 1 |
+--------------------------------------------------------------+
select first_value(cpu order by ts) from monitor;
+---------------------------------------------------------------+
| first_value(monitor.cpu) ORDER BY [monitor.ts ASC NULLS LAST] |
+---------------------------------------------------------------+
| 0.5 |
+---------------------------------------------------------------+
What did you see instead?
select last_value(cpu order by ts) from monitor;
+--------------------------------------------------------------+
| last_value(monitor.cpu) ORDER BY [monitor.tsASC NULLS LAST] |
+--------------------------------------------------------------+
| 0.6 |
+--------------------------------------------------------------+select first_value(cpu order by ts) from monitor;
+---------------------------------------------------------------+
| first_value(monitor.cpu) ORDER BY [monitor.tsASC NULLS LAST] |
+---------------------------------------------------------------+
| 0.6 |
+---------------------------------------------------------------+
What operating system did you use?
Unrelated
What version of GreptimeDB did you use?
0.8.1
Relevant log output and stack trace
NA
The text was updated successfully, but these errors were encountered:
What type of bug is this?
Incorrect result
What subsystems are affected?
Standalone mode
Minimal reproduce step
What did you expect to see?
What did you see instead?
What operating system did you use?
Unrelated
What version of GreptimeDB did you use?
0.8.1
Relevant log output and stack trace
The text was updated successfully, but these errors were encountered: