Re: Expression based grouping equality implementation

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org
Date: 2018-01-09T22:25:44Z
Lists: pgsql-hackers

Attachments

Hi,

On 2017-11-29 00:09:34 -0800, Andres Freund wrote:
> Similar to [1] (Expression based aggregate transition / combine function
> invocation), this patch provides small-medium performance benefits in
> order to later enable larger performance benefits with JIT compilation.

Here's an updated version of the patch.


> - there's now a bit of additional code at callsites to reset the
>   ExprContext - was tempted to put that that in a ExecQualAndReset()
>   inline wrapper, but that's not entirely trivial because executor.h
>   doesn't include memutils.h and ResetExprContext() is declared late.

I've now added ExecQualAndReset(), in patch 0001, and solved the above
problems by including memutils.h and "inlining" ResetExprContext() to
avoid the ordering issue. Not pretty, but seems better than the
alternatives.


I'm not yet quite happy with this, but I thought it'be good to send an
updated version...

- Andres

Commits

  1. Do execGrouping.c via expression eval machinery, take two.

  2. Do execGrouping.c via expression eval machinery.

  3. Introduce ExecQualAndReset() helper.