mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-23 06:30:05 +00:00
chore: rename the default ts column name to greptime_timestamp for influxdb line protocol (#7046)
* chore: rename influxdb ts column name to greptime_timestamp Signed-off-by: shuiyisong <xixing.sys@gmail.com> * fix: tests Signed-off-by: shuiyisong <xixing.sys@gmail.com> --------- Signed-off-by: shuiyisong <xixing.sys@gmail.com>
This commit is contained in:
@@ -42,7 +42,7 @@ monitor1,host=host2 memory=1027";
|
||||
|
||||
let mut output = instance
|
||||
.do_query(
|
||||
"SELECT ts, host, cpu, memory FROM monitor1 ORDER BY ts",
|
||||
"SELECT greptime_timestamp, host, cpu, memory FROM monitor1 ORDER BY greptime_timestamp",
|
||||
QueryContext::arc(),
|
||||
)
|
||||
.await;
|
||||
@@ -74,7 +74,7 @@ monitor1,host=host2 memory=1027 1663840496400340001";
|
||||
|
||||
let mut output = instance
|
||||
.do_query(
|
||||
"SELECT ts, host, cpu, memory FROM monitor1 ORDER BY ts",
|
||||
"SELECT greptime_timestamp, host, cpu, memory FROM monitor1 ORDER BY greptime_timestamp",
|
||||
QueryContext::arc(),
|
||||
)
|
||||
.await;
|
||||
@@ -87,7 +87,7 @@ monitor1,host=host2 memory=1027 1663840496400340001";
|
||||
recordbatches.pretty_print().unwrap(),
|
||||
"\
|
||||
+-------------------------------+-------+------+--------+
|
||||
| ts | host | cpu | memory |
|
||||
| greptime_timestamp | host | cpu | memory |
|
||||
+-------------------------------+-------+------+--------+
|
||||
| 2022-09-22T09:54:56.100023100 | host1 | 66.6 | 1024.0 |
|
||||
| 2022-09-22T09:54:56.400340001 | host2 | | 1027.0 |
|
||||
@@ -105,7 +105,7 @@ monitor1,host=host2 cpu=32 1663840496400340001";
|
||||
|
||||
let mut output = instance
|
||||
.do_query(
|
||||
"SELECT ts, host, cpu, memory FROM monitor1 ORDER BY ts",
|
||||
"SELECT greptime_timestamp, host, cpu, memory FROM monitor1 ORDER BY greptime_timestamp",
|
||||
QueryContext::arc(),
|
||||
)
|
||||
.await;
|
||||
@@ -118,7 +118,7 @@ monitor1,host=host2 cpu=32 1663840496400340001";
|
||||
recordbatches.pretty_print().unwrap(),
|
||||
"\
|
||||
+-------------------------------+-------+------+--------+
|
||||
| ts | host | cpu | memory |
|
||||
| greptime_timestamp | host | cpu | memory |
|
||||
+-------------------------------+-------+------+--------+
|
||||
| 2022-09-22T09:54:56.100023100 | host1 | 66.6 | 1024.0 |
|
||||
| 2022-09-22T09:54:56.400340001 | host2 | 32.0 | 1027.0 |
|
||||
|
||||
Reference in New Issue
Block a user