mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
fix: unwrap() None in NULL value exist multi-field table during prometheus query_range (#1571)
* fix: NULL value in multi-field table meet error in prometheus query_range * fix: suggestion * chore: change style
This commit is contained in:
@@ -350,10 +350,12 @@ impl PromJsonResponse {
|
||||
let timestamp = timestamp_millis as f64 / 1000.0;
|
||||
|
||||
// retrieve value
|
||||
let value =
|
||||
Into::<f64>::into(field_column.get_data(row_index).unwrap()).to_string();
|
||||
|
||||
buffer.entry(tags).or_default().push((timestamp, value));
|
||||
if let Some(v) = field_column.get_data(row_index) {
|
||||
buffer
|
||||
.entry(tags)
|
||||
.or_default()
|
||||
.push((timestamp, Into::<f64>::into(v).to_string()));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user