promql/
extension_plan.rs

1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15mod empty_metric;
16mod histogram_fold;
17mod instant_manipulate;
18mod normalize;
19mod planner;
20mod range_manipulate;
21mod scalar_calculate;
22mod series_divide;
23#[cfg(test)]
24mod test_util;
25mod union_distinct_on;
26
27use datafusion::arrow::datatypes::{ArrowPrimitiveType, TimestampMillisecondType};
28pub use empty_metric::{build_special_time_expr, EmptyMetric, EmptyMetricExec, EmptyMetricStream};
29pub use histogram_fold::{HistogramFold, HistogramFoldExec, HistogramFoldStream};
30pub use instant_manipulate::{InstantManipulate, InstantManipulateExec, InstantManipulateStream};
31pub use normalize::{SeriesNormalize, SeriesNormalizeExec, SeriesNormalizeStream};
32pub use planner::PromExtensionPlanner;
33pub use range_manipulate::{RangeManipulate, RangeManipulateExec, RangeManipulateStream};
34pub use scalar_calculate::ScalarCalculate;
35pub use series_divide::{SeriesDivide, SeriesDivideExec, SeriesDivideStream};
36pub use union_distinct_on::{UnionDistinctOn, UnionDistinctOnExec, UnionDistinctOnStream};
37
38pub type Millisecond = <TimestampMillisecondType as ArrowPrimitiveType>::Native;
39
40const METRIC_NUM_SERIES: &str = "num_series";