diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/eager_aggregate.out /tmp/cirrus-ci-build/build/testrun/recovery/027_stream_regress/data/results/eager_aggregate.out --- /tmp/cirrus-ci-build/src/test/regress/expected/eager_aggregate.out 2024-03-05 07:04:50.042771300 +0000 +++ /tmp/cirrus-ci-build/build/testrun/recovery/027_stream_regress/data/results/eager_aggregate.out 2024-03-05 07:10:07.906567626 +0000 @@ -45,15 +45,15 @@ SELECT t1.a, avg(t2.c) FROM eager_agg_t1 t1 JOIN eager_agg_t2 t2 ON t1.b = t2.b GROUP BY t1.a; a | avg ---+----- - 1 | 496 2 | 497 - 6 | 501 - 7 | 502 3 | 498 - 4 | 499 - 9 | 504 5 | 500 8 | 503 + 4 | 499 + 6 | 501 + 9 | 504 + 7 | 502 + 1 | 496 (9 rows) -- Produce results with sorting aggregation @@ -141,15 +141,15 @@ SELECT t1.a, avg(t2.c + t3.c) FROM eager_agg_t1 t1 JOIN eager_agg_t2 t2 ON t1.b = t2.b JOIN eager_agg_t3 t3 ON t2.a = t3.a GROUP BY t1.a; a | avg ---+----- - 1 | 497 2 | 499 - 6 | 507 - 7 | 509 3 | 501 - 4 | 503 - 9 | 513 5 | 505 8 | 511 + 4 | 503 + 6 | 507 + 9 | 513 + 7 | 509 + 1 | 497 (9 rows) -- Produce results with sorting aggregation @@ -211,41 +211,38 @@ -- Ensure aggregation can be pushed down to the non-nullable side EXPLAIN (VERBOSE, COSTS OFF) SELECT t3.a, avg(t3.c) FROM eager_agg_t1 t1 RIGHT JOIN eager_agg_t3 t3 ON t1.b = t3.b GROUP BY t3.a; - QUERY PLAN ------------------------------------------------------------- - Finalize GroupAggregate + QUERY PLAN +------------------------------------------------------ + Finalize HashAggregate Output: t3.a, avg(t3.c) Group Key: t3.a - -> Sort + -> Hash Left Join Output: t3.a, (PARTIAL avg(t3.c)) - Sort Key: t3.a - -> Hash Left Join - Output: t3.a, (PARTIAL avg(t3.c)) - Hash Cond: (t3.b = t1.b) - -> Partial HashAggregate - Output: t3.a, t3.b, PARTIAL avg(t3.c) - Group Key: t3.a, t3.b - -> Seq Scan on public.eager_agg_t3 t3 - Output: t3.a, t3.b, t3.c - -> Hash + Hash Cond: (t3.b = t1.b) + -> Partial HashAggregate + Output: t3.a, t3.b, PARTIAL avg(t3.c) + Group Key: t3.a, t3.b + -> Seq Scan on public.eager_agg_t3 t3 + Output: t3.a, t3.b, t3.c + -> Hash + Output: t1.b + -> Seq Scan on public.eager_agg_t1 t1 Output: t1.b - -> Seq Scan on public.eager_agg_t1 t1 - Output: t1.b -(18 rows) +(15 rows) SELECT t3.a, avg(t3.c) FROM eager_agg_t1 t1 RIGHT JOIN eager_agg_t3 t3 ON t1.b = t3.b GROUP BY t3.a; a | avg ---+----- - 0 | 505 + 8 | 503 + 7 | 502 + 9 | 504 1 | 496 + 5 | 500 2 | 497 - 3 | 498 4 | 499 - 5 | 500 6 | 501 - 7 | 502 - 8 | 503 - 9 | 504 + 0 | 505 + 3 | 498 (10 rows) -- Ensure aggregation cannot be pushed down to the nullable side