New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(window): initial impl window function #10700
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
mergify
bot
added
the
pr-feature
this PR introduces a new feature to the codebase
label
Mar 21, 2023
ariesdevil
force-pushed
the
window-func
branch
3 times, most recently
from
March 25, 2023 18:09
36ba9e5
to
740a979
Compare
ariesdevil
requested review from
RinChanNOWWW
and removed request for
RinChanNOWWW
March 25, 2023 18:11
explain plan mysql> explain select a, sum(b) over(partition by c order by a rows between 3 preceding and 3 following) as s from t;
+------------------------------------------------------------------------------------------------------------------------------+
| explain |
+------------------------------------------------------------------------------------------------------------------------------+
| EvalScalar |
| ├── expressions: [sum_with_window (#3)] |
| ├── estimated rows: 6.00 |
| └── Window |
| ├── aggregate function: [sum(b)] |
| ├── partition by: [c] |
| ├── order by: [a] |
| └── TableScan |
| ├── table: default.default.t |
| ├── read rows: 6 |
| ├── read bytes: 55 |
| ├── partitions total: 1 |
| ├── partitions scanned: 1 |
| ├── pruning stats: [segments: <range pruning: 1 to 1>, blocks: <range pruning: 1 to 1, bloom pruning: 0 to 0>] |
| ├── push downs: [filters: [], limit: NONE] |
| ├── output columns: [a] |
| └── estimated rows: 6.00 |
+------------------------------------------------------------------------------------------------------------------------------+
explain pipeline mysql> explain pipeline select a, sum(b) over(partition by c order by a rows between 3 preceding and 3 following) as s from t;
+---------------------------------------------------------------------------------------------+
| explain |
+---------------------------------------------------------------------------------------------+
| CompoundBlockOperator(Project) × 1 processor |
| CompoundBlockOperator(Map) × 1 processor |
| Transform Window × 1 processor |
| Merge (SortMergeTransform × 16 processors) to (Transform Window × 1) |
| SortMergeTransform × 16 processors |
| SortPartialTransform × 16 processors |
| Merge (DeserializeDataTransform × 1 processor) to (SortPartialTransform × 16) |
| DeserializeDataTransform × 1 processor |
| SyncReadParquetDataSource × 1 processor |
+---------------------------------------------------------------------------------------------+
9 rows in set (0.02 sec)
Read 0 rows, 0.00 B in 0.004 sec., 0 rows/sec., 0.00 B/sec. |
RinChanNOWWW
suggested changes
Mar 27, 2023
ariesdevil
force-pushed
the
window-func
branch
2 times, most recently
from
March 28, 2023 02:50
0e30622
to
8bac478
Compare
src/query/sql/src/planner/optimizer/heuristic/prune_unused_columns.rs
Outdated
Show resolved
Hide resolved
RinChanNOWWW
force-pushed
the
window-func
branch
2 times, most recently
from
March 28, 2023 08:29
3ae02fa
to
e59fb2c
Compare
ariesdevil
changed the title
feat(window): window function
feat(window): initial impl window function
Mar 28, 2023
FYI: the failed |
sundy-li
approved these changes
Mar 28, 2023
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
initial impl window function
Closes #issue