Skip to content

Conversation

@xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Apr 10, 2024

Support ValueWindowFunction for LEAD/LAG/FIRST_VALUE/LAST_VALUE.
Sample query from QuickStart:

SELECT city, billingMonth, sumPrecision(baseUsage) as totalUsage,
LAG(sumPrecision(baseUsage)) OVER (PARTITION BY city ORDER BY billingMonth) AS previous_month_usage, 
LEAD(sumPrecision(baseUsage)) OVER (PARTITION BY city ORDER BY billingMonth) AS next_month_usage
FROM billing
GROUP BY city, billingMonth
ORDER BY city, billingMonth

image

@xiangfu0 xiangfu0 force-pushed the value-window-function branch from 1c4f178 to 8197c40 Compare April 10, 2024 12:45
@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 68 lines in your changes are missing coverage. Please review.

Project coverage is 27.78%. Comparing base (59551e4) to head (8197c40).
Report is 258 commits behind head on master.

Files Patch % Lines
...uery/runtime/operator/WindowAggregateOperator.java 0.00% 21 Missing ⚠️
...y/runtime/operator/window/ValueWindowFunction.java 0.00% 14 Missing ⚠️
...untime/operator/window/LagValueWindowFunction.java 0.00% 10 Missing ⚠️
...ntime/operator/window/LeadValueWindowFunction.java 0.00% 10 Missing ⚠️
...time/operator/window/FirstValueWindowFunction.java 0.00% 6 Missing ⚠️
...ntime/operator/window/LastValueWindowFunction.java 0.00% 6 Missing ⚠️
...query/runtime/operator/utils/AggregationUtils.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master   #12878       +/-   ##
=============================================
- Coverage     61.75%   27.78%   -33.97%     
+ Complexity      207      198        -9     
=============================================
  Files          2436     2502       +66     
  Lines        133233   136415     +3182     
  Branches      20636    21107      +471     
=============================================
- Hits          82274    37900    -44374     
- Misses        44911    95620    +50709     
+ Partials       6048     2895     -3153     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 27.77% <0.00%> (-33.94%) ⬇️
java-21 27.76% <0.00%> (-33.87%) ⬇️
skip-bytebuffers-false 27.78% <0.00%> (-33.97%) ⬇️
skip-bytebuffers-true 27.75% <0.00%> (+0.02%) ⬆️
temurin 27.78% <0.00%> (-33.97%) ⬇️
unittests 27.77% <0.00%> (-33.97%) ⬇️
unittests1 ?
unittests2 27.77% <0.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiangfu0 xiangfu0 force-pushed the value-window-function branch from 8197c40 to 0b675f3 Compare April 10, 2024 14:59
@Jackie-Jiang Jackie-Jiang added feature documentation release-notes Referenced by PRs that need attention when compiling the next release notes multi-stage Related to the multi-stage query engine labels Apr 10, 2024
@xiangfu0 xiangfu0 merged commit 9b64b5c into apache:master Apr 10, 2024
@xiangfu0 xiangfu0 deleted the value-window-function branch April 10, 2024 18:25
@npawar
Copy link
Contributor

npawar commented May 22, 2024

@xiangfu0 have docs been updated?

@yashmayya yashmayya added the window-functions Related to SQL window functions on the multi-stage query engine label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation feature multi-stage Related to the multi-stage query engine release-notes Referenced by PRs that need attention when compiling the next release notes window-functions Related to SQL window functions on the multi-stage query engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants