diff --git a/proto/substrait_extension/range_select.proto b/proto/substrait_extension/range_select.proto new file mode 100644 index 00000000..f3e8dabb --- /dev/null +++ b/proto/substrait_extension/range_select.proto @@ -0,0 +1,44 @@ +// Copyright 2023 Greptime Team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +option go_package = "github.com/GreptimeTeam/greptime-proto/go/substrait_extension"; + +package substrait_extension; + +enum Fill { + NULL = 0; + PREV = 1; + LINEAR = 2; + CONST = 3; // Const(ScalarValue), +} + +message RangeFn { + string name = 1; + // pub data_type: DataType, + // pub expr: Expr, + // pub range: Duration, + repeated Fill fill = 5; + bool need_cast = 6; +} + +message RangeSelect { + repeated RangeFn range_expr = 1; + // pub align: Duration, + int64 align_to = 2; + string time_index = 3; + // pub by: Vec, + repeated uint32 schema_project = 6; +}