-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Open
Description
Right now we simply add all the conditions to the partial group by which maybe too much. Instead, under some conditions like - all filters are arith/relational deterministic expressions - we can just extract the variables used and add them to the partial group by and leave the rest alone. For example:
SUM(if(type=1, x)) AS sum_1,
SUM(if(type=2, x)) AS sum_2,
SUM(if(type=3, x)) AS sum_3,
here, it's best to add type to the partial group by and let the rest of the rewrite stay the same.
CC: @feilong-liu
Metadata
Metadata
Assignees
Type
Projects
Status
🆕 Unprioritized
Status
🆕 Unprioritized