Re: Partial aggregates pushdown

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>
Cc: Ilya Gladyshev <i(dot)gladyshev(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Partial aggregates pushdown
Date: 2021-11-03 13:45:38
Message-ID: D327E6BD-D368-48E4-A8A8-4B59BFB48649@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 2 Nov 2021, at 10:12, Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru> wrote:

> Updated and rebased patch.

+ state = (Int128AggState *) palloc0(sizeof(Int128AggState));
+ state->calcSumX2 = false;
+
+ if (!PG_ARGISNULL(0))
+ {
+#ifdef HAVE_INT128
+ do_int128_accum(state, (int128) PG_GETARG_INT64(0));
+#else
+ do_numeric_accum(state, int64_to_numeric(PG_GETARG_INT64(0)));
+#endif

This fails on non-INT128 platforms as state cannot be cast to Int128AggState
outside of HAVE_INT128; it's not defined there. This needs to be a
PolyNumAggState no?

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2021-11-03 13:46:33 Re: Parallelize correlated subqueries that execute within each worker
Previous Message Daniel Gustafsson 2021-11-03 13:36:15 Re: PROXY protocol support