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 absent;
16mod empty_metric;
17mod histogram_fold;
18mod instant_manipulate;
19mod normalize;
20mod planner;
21mod range_manipulate;
22mod scalar_calculate;
23mod series_divide;
24#[cfg(test)]
25mod test_util;
26mod union_distinct_on;
27
28pub use absent::{Absent, AbsentExec, AbsentStream};
29use datafusion::arrow::datatypes::{ArrowPrimitiveType, TimestampMillisecondType};
30pub use empty_metric::{build_special_time_expr, EmptyMetric, EmptyMetricExec, EmptyMetricStream};
31pub use histogram_fold::{HistogramFold, HistogramFoldExec, HistogramFoldStream};
32pub use instant_manipulate::{InstantManipulate, InstantManipulateExec, InstantManipulateStream};
33pub use normalize::{SeriesNormalize, SeriesNormalizeExec, SeriesNormalizeStream};
34pub use planner::PromExtensionPlanner;
35pub use range_manipulate::{RangeManipulate, RangeManipulateExec, RangeManipulateStream};
36pub use scalar_calculate::ScalarCalculate;
37pub use series_divide::{SeriesDivide, SeriesDivideExec, SeriesDivideStream};
38pub use union_distinct_on::{UnionDistinctOn, UnionDistinctOnExec, UnionDistinctOnStream};
39
40pub type Millisecond = <TimestampMillisecondType as ArrowPrimitiveType>::Native;
41
42const METRIC_NUM_SERIES: &str = "num_series";