Re: [HACKERS] Macro customizable hashtable / bitmapscan &aggregation perf

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] Macro customizable hashtable / bitmapscan &aggregation perf
Дата
Msg-id 20161209232647.rji3yiwcsllhkfgc@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Macro customizable hashtable / bitmapscan & aggregation perf  (Mark Dilger <hornschnorter@gmail.com>)
Список pgsql-hackers
Hi,

On 2016-12-09 15:21:36 -0800, Mark Dilger wrote:
> Andres,
> 
> Your patch, below, appears to have been applied to master in commit
> 5dfc198146b49ce7ecc8a1fc9d5e171fb75f6ba5.  It makes mention of a
> function, tuplehash_start_iterate, in a macro, but the function is not
> defined or declared, and its signature and intention is not clear.  Is there
> any chance you could add some documentation about how this function
> is intended to be used and defined?
> 
> See InitTupleHashIterator in src/include/nodes/execnodes.h

The patch generates functions based on the defined prefix. E.g.

/* define paramters necessary to generate the tuple hash table interface */
#define SH_PREFIX tuplehash
#define SH_ELEMENT_TYPE TupleHashEntryData
#define SH_KEY_TYPE MinimalTuple
#define SH_SCOPE extern
#define SH_DECLARE
#include "lib/simplehash.h"

makes tuplehash_iterate out of
#define SH_START_ITERATE SH_MAKE_NAME(start_iterate)
...
SH_SCOPE void SH_START_ITERATE(SH_TYPE *tb, SH_ITERATOR *iter);
SH_SCOPE void
SH_START_ITERATE(SH_TYPE *tb, SH_ITERATOR *iter)
{
...
}

See the simplehash.h's header for some explanation.


Hope that helps,

Andres



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: [HACKERS] Macro customizable hashtable / bitmapscan & aggregation perf
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW)