Skip to content
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

Add FunnelCompleteCount aggregation function #13231

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented May 26, 2024

  • Add FunnelCompleteCountAggregationFunction to calculate how many completed count of funnels;
  • Add FunnelMatchStepAggregationFunction to calculate the funnel match array;
  • Extract common logic to FunnelBaseAggregationFunction for
    • FunnelMaxStepAggregationFunction
    • FunnelCompleteCountAggregationFunction
    • FunnelMatchStepAggregationFunction

Changed the function syntax a bit to:

FunnelMaxStepAggregationFunction(timestampExpression, windowSize, numberSteps, stepExpression, [stepExpression, ..], [mode, [mode, ... ]])

E.g.

SELECT 
            userId, funnelMatchStep(timestampCol, '1000', 4, 
            url = '/product/search', 
            url = '/cart/add', 
            url = '/checkout/start', 
            url = '/checkout/confirmation', 
            'strict_increase' )
FROM 
            myTable 
GROUP BY userId ORDER BY userId LIMIT 100

@xiangfu0 xiangfu0 changed the title Add FunnelCompleteCount function Add FunnelCompleteCount aggregation function May 26, 2024
@xiangfu0 xiangfu0 force-pushed the FunnelCompleteCount-New branch 2 times, most recently from bfb598e to 1cb05bc Compare May 26, 2024 06:22
@codecov-commenter
Copy link

codecov-commenter commented May 26, 2024

Codecov Report

Attention: Patch coverage is 4.79042% with 159 lines in your changes missing coverage. Please review.

Project coverage is 62.05%. Comparing base (59551e4) to head (3bcb4ed).
Report is 546 commits behind head on master.

Files Patch % Lines
...nel/window/FunnelMatchStepAggregationFunction.java 0.00% 51 Missing ⚠️
...window/FunnelCompleteCountAggregationFunction.java 0.00% 41 Missing ⚠️
...unnel/window/FunnelMaxStepAggregationFunction.java 0.00% 41 Missing ⚠️
...n/funnel/window/FunnelBaseAggregationFunction.java 0.00% 13 Missing ⚠️
...e/pinot/common/function/scalar/ArrayFunctions.java 0.00% 8 Missing ⚠️
...che/pinot/segment/spi/AggregationFunctionType.java 66.66% 3 Missing ⚠️
...gregation/function/AggregationFunctionFactory.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13231      +/-   ##
============================================
+ Coverage     61.75%   62.05%   +0.30%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2539     +103     
  Lines        133233   139436    +6203     
  Branches      20636    21575     +939     
============================================
+ Hits          82274    86530    +4256     
- Misses        44911    46420    +1509     
- Partials       6048     6486     +438     
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 62.03% <4.79%> (+0.32%) ⬆️
java-21 61.93% <4.79%> (+0.30%) ⬆️
skip-bytebuffers-false 62.04% <4.79%> (+0.30%) ⬆️
skip-bytebuffers-true 61.89% <4.79%> (+34.16%) ⬆️
temurin 62.05% <4.79%> (+0.30%) ⬆️
unittests 62.05% <4.79%> (+0.30%) ⬆️
unittests1 46.60% <4.79%> (-0.30%) ⬇️
unittests2 27.76% <0.00%> (+0.03%) ⬆️

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 added feature multi-stage Related to the multi-stage query engine labels May 30, 2024
@xiangfu0 xiangfu0 force-pushed the FunnelCompleteCount-New branch 5 times, most recently from 0520ee5 to fa48a88 Compare June 3, 2024 04:54
@xiangfu0 xiangfu0 added the release-notes Referenced by PRs that need attention when compiling the next release notes label Jun 4, 2024
@xiangfu0 xiangfu0 merged commit db69d3d into apache:master Jun 4, 2024
18 of 20 checks passed
@xiangfu0 xiangfu0 deleted the FunnelCompleteCount-New branch June 4, 2024 19:56
@xiangfu0 xiangfu0 added the backward-incompat Referenced by PRs that introduce or fix backward compat issues label Jun 5, 2024
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backward-incompat Referenced by PRs that introduce or fix backward compat issues feature multi-stage Related to the multi-stage query engine release-notes Referenced by PRs that need attention when compiling the next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants