aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execProcnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-04-19 22:35:18 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-04-19 22:35:18 +0000
commit4a8c5d0375f17d8d961a280cbb640996aaa8bf0d (patch)
treed12840ac104b45911406a533274add8456300815 /src/backend/executor/execProcnode.c
parent04ce41ca622c40c0501de1e31cf888f64f1736bf (diff)
downloadpostgresql-4a8c5d0375f17d8d961a280cbb640996aaa8bf0d.tar.gz
postgresql-4a8c5d0375f17d8d961a280cbb640996aaa8bf0d.zip
Create executor and planner-backend support for decoupled heap and index
scans, using in-memory tuple ID bitmaps as the intermediary. The planner frontend (path creation and cost estimation) is not there yet, so none of this code can be executed. I have tested it using some hacked planner code that is far too ugly to see the light of day, however. Committing now so that the bulk of the infrastructure changes go in before the tree drifts under me.
Diffstat (limited to 'src/backend/executor/execProcnode.c')
-rw-r--r--src/backend/executor/execProcnode.c72
1 files changed, 71 insertions, 1 deletions
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c
index 555668e7799..28f67a2562f 100644
--- a/src/backend/executor/execProcnode.c
+++ b/src/backend/executor/execProcnode.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.49 2005/04/16 20:07:35 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.50 2005/04/19 22:35:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -81,6 +81,10 @@
#include "executor/instrument.h"
#include "executor/nodeAgg.h"
#include "executor/nodeAppend.h"
+#include "executor/nodeBitmapAnd.h"
+#include "executor/nodeBitmapHeapscan.h"
+#include "executor/nodeBitmapIndexscan.h"
+#include "executor/nodeBitmapOr.h"
#include "executor/nodeFunctionscan.h"
#include "executor/nodeGroup.h"
#include "executor/nodeHash.h"
@@ -140,6 +144,14 @@ ExecInitNode(Plan *node, EState *estate)
result = (PlanState *) ExecInitAppend((Append *) node, estate);
break;
+ case T_BitmapAnd:
+ result = (PlanState *) ExecInitBitmapAnd((BitmapAnd *) node, estate);
+ break;
+
+ case T_BitmapOr:
+ result = (PlanState *) ExecInitBitmapOr((BitmapOr *) node, estate);
+ break;
+
/*
* scan nodes
*/
@@ -151,6 +163,14 @@ ExecInitNode(Plan *node, EState *estate)
result = (PlanState *) ExecInitIndexScan((IndexScan *) node, estate);
break;
+ case T_BitmapIndexScan:
+ result = (PlanState *) ExecInitBitmapIndexScan((BitmapIndexScan *) node, estate);
+ break;
+
+ case T_BitmapHeapScan:
+ result = (PlanState *) ExecInitBitmapHeapScan((BitmapHeapScan *) node, estate);
+ break;
+
case T_TidScan:
result = (PlanState *) ExecInitTidScan((TidScan *) node, estate);
break;
@@ -290,6 +310,10 @@ ExecProcNode(PlanState *node)
result = ExecAppend((AppendState *) node);
break;
+ /* BitmapAndState does not yield tuples */
+
+ /* BitmapOrState does not yield tuples */
+
/*
* scan nodes
*/
@@ -301,6 +325,12 @@ ExecProcNode(PlanState *node)
result = ExecIndexScan((IndexScanState *) node);
break;
+ /* BitmapIndexScanState does not yield tuples */
+
+ case T_BitmapHeapScanState:
+ result = ExecBitmapHeapScan((BitmapHeapScanState *) node);
+ break;
+
case T_TidScanState:
result = ExecTidScan((TidScanState *) node);
break;
@@ -409,6 +439,18 @@ MultiExecProcNode(PlanState *node)
result = MultiExecHash((HashState *) node);
break;
+ case T_BitmapIndexScanState:
+ result = MultiExecBitmapIndexScan((BitmapIndexScanState *) node);
+ break;
+
+ case T_BitmapAndState:
+ result = MultiExecBitmapAnd((BitmapAndState *) node);
+ break;
+
+ case T_BitmapOrState:
+ result = MultiExecBitmapOr((BitmapOrState *) node);
+ break;
+
default:
elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node));
result = NULL;
@@ -442,6 +484,12 @@ ExecCountSlotsNode(Plan *node)
case T_Append:
return ExecCountSlotsAppend((Append *) node);
+ case T_BitmapAnd:
+ return ExecCountSlotsBitmapAnd((BitmapAnd *) node);
+
+ case T_BitmapOr:
+ return ExecCountSlotsBitmapOr((BitmapOr *) node);
+
/*
* scan nodes
*/
@@ -451,6 +499,12 @@ ExecCountSlotsNode(Plan *node)
case T_IndexScan:
return ExecCountSlotsIndexScan((IndexScan *) node);
+ case T_BitmapIndexScan:
+ return ExecCountSlotsBitmapIndexScan((BitmapIndexScan *) node);
+
+ case T_BitmapHeapScan:
+ return ExecCountSlotsBitmapHeapScan((BitmapHeapScan *) node);
+
case T_TidScan:
return ExecCountSlotsTidScan((TidScan *) node);
@@ -554,6 +608,14 @@ ExecEndNode(PlanState *node)
ExecEndAppend((AppendState *) node);
break;
+ case T_BitmapAndState:
+ ExecEndBitmapAnd((BitmapAndState *) node);
+ break;
+
+ case T_BitmapOrState:
+ ExecEndBitmapOr((BitmapOrState *) node);
+ break;
+
/*
* scan nodes
*/
@@ -565,6 +627,14 @@ ExecEndNode(PlanState *node)
ExecEndIndexScan((IndexScanState *) node);
break;
+ case T_BitmapIndexScanState:
+ ExecEndBitmapIndexScan((BitmapIndexScanState *) node);
+ break;
+
+ case T_BitmapHeapScanState:
+ ExecEndBitmapHeapScan((BitmapHeapScanState *) node);
+ break;
+
case T_TidScanState:
ExecEndTidScan((TidScanState *) node);
break;