-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Refactor WindowFunction process rows in batched partition #12993
Refactor WindowFunction process rows in batched partition #12993
Conversation
45c24a7
to
e1a8fec
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12993 +/- ##
=============================================
- Coverage 61.75% 0.00% -61.76%
=============================================
Files 2436 2439 +3
Lines 133233 134144 +911
Branches 20636 20769 +133
=============================================
- Hits 82274 0 -82274
- Misses 44911 134144 +89233
+ Partials 6048 0 -6048
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8fb79de
to
6ef8918
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some more comments in the PR describing about the different types of window functions extracted? What is their difference?
* processRows(List<Object[]> rows) which processes a batch of rows at a time. | ||
* | ||
*/ | ||
public abstract class WindowFunction extends AggregationUtils.Accumulator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding a WindowFunctionFactory
if you want to make it pluggable, maybe following the same way of how TransformFunction
is handle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also consider making this a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added WindowFunctionFactory, will make a separated pr for pluggable stuffs
Following how presto models the WindowFunction with one
|
6ef8918
to
0a125ee
Compare
0a125ee
to
b46e4ed
Compare
Refactor WindowAggregateOperator from row based processing model to batch processing model.
Motivation: following how presto models the WindowFunction with one
WindowFunction
interface, then 3 types:RankingWindowFunction
, this is for all the ranking functions. Here are all the implements:CumulativeDistributionFunction
,CustomRank
,DenseRankFunction
,NTileFunction
,PercentRankFunction
,RankFunction
,RowNumberFunction
ValueWindowFunction
, this is for all the row position based functions. Here are all the implements:FirstValueFunction
,LagFunction
,LastValueFunction
,LeadFunction
,NthValueFunction