mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-15 12:30:38 +00:00
fix: http and tql should return the same value for nuknown (#6718)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
@@ -185,6 +185,14 @@ impl PrometheusJsonResponse {
|
||||
metric_name: Option<String>,
|
||||
result_type: ValueType,
|
||||
) -> Result<PrometheusResponse> {
|
||||
// Return empty result if no batches
|
||||
if batches.iter().next().is_none() {
|
||||
return Ok(PrometheusResponse::PromData(PromData {
|
||||
result_type: result_type.to_string(),
|
||||
..Default::default()
|
||||
}));
|
||||
}
|
||||
|
||||
// infer semantic type of each column from schema.
|
||||
// TODO(ruihang): wish there is a better way to do this.
|
||||
let mut timestamp_column_index = None;
|
||||
|
||||
Reference in New Issue
Block a user