File tree Expand file tree Collapse file tree 9 files changed +1267
-0
lines changed
Expand file tree Collapse file tree 9 files changed +1267
-0
lines changed Original file line number Diff line number Diff line change @@ -39,3 +39,6 @@ pub use transforms::TransformLimit;
3939pub use transforms:: TransformResortAddOn ;
4040pub use transforms:: TransformRuntimeFilter ;
4141pub use transforms:: TransformSortPartial ;
42+ pub use transforms:: TransformWindow ;
43+ pub use transforms:: WindowFrame ;
44+ pub use transforms:: WindowFrameBound ;
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ mod transform_hash_join;
2121mod transform_left_join;
2222mod transform_limit;
2323mod transform_mark_join;
24+ mod window;
2425
2526mod profile_wrapper;
2627mod runtime_filter;
@@ -90,3 +91,6 @@ pub use transform_runtime_filter::SinkRuntimeFilterSource;
9091pub use transform_runtime_filter:: TransformRuntimeFilter ;
9192pub use transform_sort_merge:: SortMergeCompactor ;
9293pub use transform_sort_partial:: TransformSortPartial ;
94+ pub use window:: TransformWindow ;
95+ pub use window:: WindowFrame ;
96+ pub use window:: WindowFrameBound ;
Original file line number Diff line number Diff line change 1+ // Copyright 2023 Datafuse Labs.
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+
15+ #[ derive( Clone ) ]
16+ pub enum WindowFrameBound {
17+ /// `CURRENT ROW`
18+ CurrentRow ,
19+ /// `<N> PRECEDING` or `UNBOUNDED PRECEDING`.
20+ Preceding ( Option < usize > ) ,
21+ /// `<N> FOLLOWING` or `UNBOUNDED FOLLOWING`.
22+ Following ( Option < usize > ) ,
23+ }
24+
25+ #[ derive( Clone ) ]
26+ pub struct WindowFrame {
27+ // TODO: support RANGE frame, only support Rows frame now.
28+ pub start_bound : WindowFrameBound ,
29+ pub end_bound : WindowFrameBound ,
30+ }
Original file line number Diff line number Diff line change 1+ // Copyright 2023 Datafuse Labs.
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+
15+ mod frame;
16+ mod transform_window;
17+
18+ pub use frame:: WindowFrame ;
19+ pub use frame:: WindowFrameBound ;
20+ pub use transform_window:: TransformWindow ;
You can’t perform that action at this time.
0 commit comments