Skip to content
Snippets Groups Projects
Commit e3aa17d6 authored by Arseniy Volynets's avatar Arseniy Volynets :boy_tone5:
Browse files

refactor: simplify 2-stage, remove duplicates

- Refactor 2-stage aggregation pipeline, so it is easier to read and work with
- add logic for removing duplicate grouping expressions and aggregates from local stage:
 
`select sum(a), sum(a) from t` 

We should compute only one aggregate at local stage.

The same goes for grouping expressions: 

`select sum(distinct a) from t group by a`

At local stage we must use `a` only once in projection.
parent c311ff0b
No related branches found
No related tags found
1 merge request!1414sbroad import
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment