mirror of https://github.com/citusdata/citus.git
Merge pull request #3447 from citusdata/fix-group-by-distribution-no-group-by
Intermediate row pull up should be false whenever we can fully push down groupingpull/3448/head
commit
461facb149
|
@ -76,7 +76,8 @@ BuildExtendedOpNodeProperties(MultiExtendedOp *extendedOpNode, bool
|
||||||
hasNonPartitionColumnDistinctAgg;
|
hasNonPartitionColumnDistinctAgg;
|
||||||
extendedOpNodeProperties.pullDistinctColumns = pullDistinctColumns;
|
extendedOpNodeProperties.pullDistinctColumns = pullDistinctColumns;
|
||||||
extendedOpNodeProperties.pushDownWindowFunctions = pushDownWindowFunctions;
|
extendedOpNodeProperties.pushDownWindowFunctions = pushDownWindowFunctions;
|
||||||
extendedOpNodeProperties.pullUpIntermediateRows = pullUpIntermediateRows;
|
extendedOpNodeProperties.pullUpIntermediateRows =
|
||||||
|
!groupedByDisjointPartitionColumn && pullUpIntermediateRows;
|
||||||
|
|
||||||
return extendedOpNodeProperties;
|
return extendedOpNodeProperties;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,25 @@ select key, stddev(valf) from aggdata group by key having stddev(val::float8) >
|
||||||
2 | 1.01500410508201
|
2 | 1.01500410508201
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
-- Test https://github.com/citusdata/citus/issues/3446
|
||||||
|
set citus.coordinator_aggregation_strategy to 'row-gather';
|
||||||
|
select id, stddev(val) from aggdata group by id order by 1;
|
||||||
|
id | stddev
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
1 |
|
||||||
|
2 |
|
||||||
|
3 |
|
||||||
|
4 |
|
||||||
|
5 |
|
||||||
|
6 |
|
||||||
|
7 |
|
||||||
|
8 |
|
||||||
|
9 |
|
||||||
|
10 |
|
||||||
|
11 |
|
||||||
|
(11 rows)
|
||||||
|
|
||||||
|
set citus.coordinator_aggregation_strategy to 'disabled';
|
||||||
-- test polymorphic aggregates from https://github.com/citusdata/citus/issues/2397
|
-- test polymorphic aggregates from https://github.com/citusdata/citus/issues/2397
|
||||||
-- we do not currently support pseudotypes for transition types, so this errors for now
|
-- we do not currently support pseudotypes for transition types, so this errors for now
|
||||||
CREATE OR REPLACE FUNCTION first_agg(anyelement, anyelement)
|
CREATE OR REPLACE FUNCTION first_agg(anyelement, anyelement)
|
||||||
|
|
|
@ -68,6 +68,10 @@ select sum2(val), sum2_strict(val) from aggdata where valf = 0;
|
||||||
select key, stddev(valf) from aggdata group by key having stddev(valf) > 2 order by key;
|
select key, stddev(valf) from aggdata group by key having stddev(valf) > 2 order by key;
|
||||||
select key, stddev(valf) from aggdata group by key having stddev(val::float8) > 1 order by key;
|
select key, stddev(valf) from aggdata group by key having stddev(val::float8) > 1 order by key;
|
||||||
|
|
||||||
|
-- Test https://github.com/citusdata/citus/issues/3446
|
||||||
|
set citus.coordinator_aggregation_strategy to 'row-gather';
|
||||||
|
select id, stddev(val) from aggdata group by id order by 1;
|
||||||
|
set citus.coordinator_aggregation_strategy to 'disabled';
|
||||||
|
|
||||||
-- test polymorphic aggregates from https://github.com/citusdata/citus/issues/2397
|
-- test polymorphic aggregates from https://github.com/citusdata/citus/issues/2397
|
||||||
-- we do not currently support pseudotypes for transition types, so this errors for now
|
-- we do not currently support pseudotypes for transition types, so this errors for now
|
||||||
|
|
Loading…
Reference in New Issue