cube icon indicating copy to clipboard operation
cube copied to clipboard

chore(cubesql): Reaggregate CubeScan projections

Open MazterQyou opened this issue 3 years ago • 1 comments

Check List

  • [x] Tests has been run in packages where changes made if available
  • [x] Linter has been run for changed code
  • [x] Tests for the changes have been added if not covered yet
  • [x] Docs have been added / updated if required

Description of Changes Made (if issue reference is not provided)

This PR introduces rewrites to enable aggregation on top of projection with CubeScan, allowing re-aggregation (DF post-processing). An example use case is to extract MONTH with DatePart without GROUP BY clause.

MazterQyou avatar Jul 20 '22 19:07 MazterQyou

Codecov Report

Base: 81.22% // Head: 72.30% // Decreases project coverage by -8.91% :warning:

Coverage data is based on head (06b5aec) compared to base (ecb10b1). Patch coverage: 93.44% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4959      +/-   ##
==========================================
- Coverage   81.22%   72.30%   -8.92%     
==========================================
  Files         134      274     +140     
  Lines       16575    29051   +12476     
  Branches        0     3023    +3023     
==========================================
+ Hits        13463    21006    +7543     
- Misses       3112     7741    +4629     
- Partials        0      304     +304     
Flag Coverage Δ
cube-backend 59.89% <ø> (?)
cubesql 81.36% <93.44%> (+0.13%) :arrow_up:

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

Impacted Files Coverage Δ
rust/cubesql/cubesql/src/compile/mod.rs 64.12% <ø> (ø)
...besql/cubesql/src/compile/rewrite/rules/members.rs 98.05% <ø> (ø)
...cubesql/cubesql/src/compile/rewrite/rules/split.rs 95.96% <93.27%> (-0.69%) :arrow_down:
rust/cubesql/cubesql/src/compile/rewrite/cost.rs 96.82% <100.00%> (+0.10%) :arrow_up:
rust/cubesql/cubesql/src/compile/rewrite/mod.rs 92.95% <100.00%> (+0.09%) :arrow_up:
rust/cubesql/cubesql/src/sql/statement.rs 71.31% <0.00%> (-0.58%) :arrow_down:
packages/cubejs-server-core/src/core/logger.js 29.03% <0.00%> (ø)
...ackages/cubejs-server-core/src/core/CompilerApi.js 82.79% <0.00%> (ø)
...ges/cubejs-schema-compiler/src/extensions/index.ts 100.00% <0.00%> (ø)
...s/cubejs-schema-compiler/src/adapter/MysqlQuery.js 25.49% <0.00%> (ø)
... and 137 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jul 20 '22 19:07 codecov[bot]