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:
shuiyisong
2025-10-09 10:14:11 +08:00
committed by GitHub
parent 1aa4f346a0
commit b24a55cea4
3 changed files with 10 additions and 10 deletions

View File

@@ -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 |