Skip to content

Commit 909764a

Browse files
committed
Use hostname column from system.*_log over hostName()
1 parent 0b7fac2 commit 909764a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/interpreter/clickhouse.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl ClickHouse {
260260
is_initial_query,
261261
initial_query_id,
262262
query_id,
263-
hostName() as host_name,
263+
hostname as host_name,
264264
current_database,
265265
query_start_time_microseconds,
266266
event_time_microseconds AS query_end_time_microseconds,
@@ -340,7 +340,7 @@ impl ClickHouse {
340340
is_initial_query,
341341
initial_query_id,
342342
query_id,
343-
hostName() as host_name,
343+
hostname as host_name,
344344
current_database,
345345
query_start_time_microseconds,
346346
event_time_microseconds AS query_end_time_microseconds,
@@ -841,7 +841,7 @@ impl ClickHouse {
841841
fromUnixTimestamp64Nano({}) AS start_time_,
842842
{} AS end_time_
843843
SELECT
844-
hostName() AS host_name,
844+
hostname AS host_name,
845845
event_time,
846846
event_time_microseconds,
847847
thread_id,
@@ -877,7 +877,7 @@ impl ClickHouse {
877877
"".into()
878878
},
879879
if let Some(hostname) = &args.hostname {
880-
format!("AND hostName() = '{}'", hostname)
880+
format!("AND hostname = '{}'", hostname)
881881
} else {
882882
"".into()
883883
},

0 commit comments

Comments
 (0)