aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/bitmapset.h
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2017-03-27 04:20:54 +0100
committerAndrew Gierth <rhodiumtoad@postgresql.org>2017-03-27 04:20:54 +0100
commitb5635948ab165b6070e7d05d111f966e07570d81 (patch)
tree9e8581fa3530ea777b14ce4900ba7cea106e3450 /src/include/nodes/bitmapset.h
parentf0a6046bcb15c2fe48384ef547df2bfb5d7f0a89 (diff)
downloadpostgresql-b5635948ab165b6070e7d05d111f966e07570d81.tar.gz
postgresql-b5635948ab165b6070e7d05d111f966e07570d81.zip
Support hashed aggregation with grouping sets.
This extends the Aggregate node with two new features: HashAggregate can now run multiple hashtables concurrently, and a new strategy MixedAggregate populates hashtables while doing sorted grouping. The planner will now attempt to save as many sorts as possible when planning grouping sets queries, while not exceeding work_mem for the estimated combined sizes of all hashtables used. No SQL-level changes are required. There should be no user-visible impact other than the new EXPLAIN output and possible changes to result ordering when ORDER BY was not used (which affected a few regression tests). The enable_hashagg option is respected. Author: Andrew Gierth Reviewers: Mark Dilger, Andres Freund Discussion: https://postgr.es/m/87vatszyhj.fsf@news-spur.riddles.org.uk
Diffstat (limited to 'src/include/nodes/bitmapset.h')
-rw-r--r--src/include/nodes/bitmapset.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/nodes/bitmapset.h b/src/include/nodes/bitmapset.h
index 4f1910e5a98..109f7b0c148 100644
--- a/src/include/nodes/bitmapset.h
+++ b/src/include/nodes/bitmapset.h
@@ -21,6 +21,11 @@
#define BITMAPSET_H
/*
+ * Forward decl to save including pg_list.h
+ */
+struct List;
+
+/*
* Data representation
*/
@@ -70,6 +75,7 @@ extern bool bms_is_subset(const Bitmapset *a, const Bitmapset *b);
extern BMS_Comparison bms_subset_compare(const Bitmapset *a, const Bitmapset *b);
extern bool bms_is_member(int x, const Bitmapset *a);
extern bool bms_overlap(const Bitmapset *a, const Bitmapset *b);
+extern bool bms_overlap_list(const Bitmapset *a, const struct List *b);
extern bool bms_nonempty_difference(const Bitmapset *a, const Bitmapset *b);
extern int bms_singleton_member(const Bitmapset *a);
extern bool bms_get_singleton_member(const Bitmapset *a, int *member);