diff --git a/src/query/src/promql/native_compile.rs b/src/query/src/promql/native_compile.rs index 6dd5fa992c5..7f6debcac12 100644 --- a/src/query/src/promql/native_compile.rs +++ b/src/query/src/promql/native_compile.rs @@ -497,8 +497,8 @@ fn binary_operation(context: &Context, binary: &BinaryExpr) -> Result CompiledTree { } /// The metric `name` with `labels`, as a source series of the samples a scan would read. -fn metric(name: &str, labels: &[(&str, &str)]) -> MetricName { +fn metric(name: &str, labels: &[(&str, &str)]) -> SeriesLabels { let tags = labels .iter() .map(|(name, value)| Label { @@ -82,7 +82,7 @@ fn metric(name: &str, labels: &[(&str, &str)]) -> MetricName { value: (*value).into(), }) .collect(); - MetricName::try_new(Some(name.into()), tags).expect("distinct label names") + SeriesLabels::try_new(Some(name.into()), tags).expect("distinct label names") } /// One raw chunk of `series`, holding `rows` at their source timestamps, closing the series. @@ -92,7 +92,7 @@ fn metric(name: &str, labels: &[(&str, &str)]) -> MetricName { fn raw_chunk( schema: &SeriesSchema, key: &str, - series: MetricName, + series: SeriesLabels, rows: &[(i64, f64)], ) -> RawSeriesChunk { let timestamps: Vec = rows.iter().map(|&(time, _)| time).collect();