matrixorigin / matrixorigin/matrixone

[Tech Request]: Improve performance of range frame in over() window function

Open
#12,961 0 comments 0 reactions 1 assignee Claimed by @iamlinjunhong View on GitHub
kind/tech-request priority/p0 team/c2
Dominant language
Go
Stars
1.9k
Forks
311
Avg merge
1d 3h
Merged PRs (30d)
768

Description

### Is there an existing issue for the same feature request?

- [X] I have checked the existing issues.

### Is your feature request related to a problem?

```Markdown
window_function_name(window_name/expression)
OVER (
[partition_defintion]
[order_definition]
[frame_definition])

●window_function_name:窗口函数的名字,例如 rank
●window_name/expression:窗口函数表达式
●partition_definition:窗口按照指定字段进行分区,如果没有指定partition by 和 frame,则把所有数据当作一个分区。
●order_definition:指定字段排序,对分区后的数据进行排序。
●frame_definition:当前分区的子集,通常作为滑动窗口使用,静态窗口函数没有 frame 子句。frame_unit 有两种 rows 和 range
○rows:基于行号
■可以使用 between and 来表示行范围,其中和支持一些关键字
●current row:当前行
●unbounded preceding:分区中的第一行
●unbounded following:分区中的最后一行
●expr preceding:当前行往前 行,expr 为数字表达式
●expr following:当前行往后 行,expr 为数字表达式
○range:基于值的范围
■可以使用 between and 来表示值范围,其中和支持一些关键字
●expr preceding:当前行的值 - ,expr 为数字表达式
●expr following:当前行的值 + ,expr 为数字表达式
```

### Describe the feature you'd like

当前基于 range 的性能比较差,需要优化

### Describe implementation you've considered

_No response_

### Documentation, Adoption, Use Case, Migration Strategy

_No response_

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.