mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 06:12:55 +00:00
refactor: bring metrics to http output (#3247)
* refactor: bring metrics to http output * chore: remove unwrap * chore: make walk plan accumulate * chore: change field name and comment * chore: add metrics to http resp header * chore: move PrometheusJsonResponse to a separate file and impl IntoResponse * chore: put metrics in prometheus resp header too
This commit is contained in:
@@ -466,7 +466,7 @@ impl Database for GreptimeDB {
|
||||
}) as _
|
||||
} else {
|
||||
let mut result = client.sql(&query).await;
|
||||
if let Ok(Output::Stream(stream)) = result {
|
||||
if let Ok(Output::Stream(stream, _)) = result {
|
||||
match RecordBatches::try_collect(stream).await {
|
||||
Ok(recordbatches) => result = Ok(Output::RecordBatches(recordbatches)),
|
||||
Err(e) => {
|
||||
@@ -577,7 +577,7 @@ impl Display for ResultDisplayer {
|
||||
}
|
||||
}
|
||||
}
|
||||
Output::Stream(_) => unreachable!(),
|
||||
Output::Stream(_, _) => unreachable!(),
|
||||
},
|
||||
Err(e) => {
|
||||
let status_code = e.status_code();
|
||||
|
||||
Reference in New Issue
Block a user