mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
refactor: convert to prometheus values directly from arrow (#7153)
* refactor: convert to prometheus values directly from arrow Signed-off-by: luofucong <luofc@foxmail.com> * resolve PR comments Signed-off-by: luofucong <luofc@foxmail.com> --------- Signed-off-by: luofucong <luofc@foxmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ use servers::http::header::constants::{
|
||||
GREPTIME_LOG_TABLE_NAME_HEADER_NAME, GREPTIME_PIPELINE_NAME_HEADER_NAME,
|
||||
};
|
||||
use servers::http::header::{GREPTIME_DB_HEADER_NAME, GREPTIME_TIMEZONE_HEADER_NAME};
|
||||
use servers::http::prometheus::{PrometheusJsonResponse, PrometheusResponse};
|
||||
use servers::http::prometheus::{Column, PrometheusJsonResponse, PrometheusResponse};
|
||||
use servers::http::result::error_result::ErrorResponse;
|
||||
use servers::http::result::greptime_result_v1::GreptimedbV1Response;
|
||||
use servers::http::result::influxdb_result_v1::{InfluxdbOutput, InfluxdbV1Response};
|
||||
@@ -849,10 +849,10 @@ pub async fn test_prom_http_api(store_type: StorageType) {
|
||||
let actual = series
|
||||
.remove(0)
|
||||
.into_iter()
|
||||
.collect::<BTreeMap<String, String>>();
|
||||
.collect::<BTreeMap<Column, String>>();
|
||||
let expected = BTreeMap::from([
|
||||
("__name__".to_string(), "demo".to_string()),
|
||||
("host".to_string(), "host1".to_string()),
|
||||
("__name__".into(), "demo".to_string()),
|
||||
("host".into(), "host1".to_string()),
|
||||
]);
|
||||
assert_eq!(actual, expected);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user