INSERT SUB FUSION
opfusion support insert ... select
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
|
||||
#include "nodes/execnodes.h"
|
||||
|
||||
extern TupleTableSlot* SeqNext(SeqScanState* node);
|
||||
extern SeqScanState* ExecInitSeqScan(SeqScan* node, EState* estate, int eflags);
|
||||
extern void ExecEndSeqScan(SeqScanState* node);
|
||||
extern void ExecSeqMarkPos(SeqScanState* node);
|
||||
|
||||
@ -72,4 +72,53 @@ private:
|
||||
InsertFusionLocaleVariable m_c_local;
|
||||
};
|
||||
|
||||
class InsertSubFusion : public OpFusion {
|
||||
public:
|
||||
InsertSubFusion(MemoryContext context, CachedPlanSource* psrc, List* plantree_list, ParamListInfo params);
|
||||
|
||||
~InsertSubFusion(){};
|
||||
|
||||
bool execute(long max_rows, char* completionTag);
|
||||
|
||||
void InitLocals(ParamListInfo params);
|
||||
|
||||
void InitGlobals();
|
||||
|
||||
void InitPlan();
|
||||
|
||||
private:
|
||||
|
||||
unsigned long ExecInsert(Relation rel, ResultRelInfo* resultRelInfo);
|
||||
|
||||
struct VarLoc {
|
||||
int varNo;
|
||||
int scanKeyIndx;
|
||||
};
|
||||
struct InsertSubFusionGlobalVariable {
|
||||
int m_targetParamNum;
|
||||
|
||||
int m_targetConstNum;
|
||||
|
||||
ConstLoc* m_targetConstLoc;
|
||||
|
||||
int m_varNum;
|
||||
|
||||
VarLoc* m_targetVarLoc;
|
||||
};
|
||||
InsertSubFusionGlobalVariable* m_c_global;
|
||||
|
||||
struct InsertSubFusionLocaleVariable {
|
||||
EState* m_estate; /* Top estate*/
|
||||
Datum* m_curVarValue;
|
||||
bool* m_curVarIsnull;
|
||||
Plan* m_plan;
|
||||
SeqScan* m_ss_plan;
|
||||
PlanState* m_ps;
|
||||
SeqScanState* m_sub_ps;
|
||||
ModifyTableState* m_mt_state;
|
||||
};
|
||||
|
||||
InsertSubFusionLocaleVariable m_c_local;
|
||||
};
|
||||
|
||||
#endif /* SRC_INCLUDE_OPFUSION_OPFUSION_INSERT_H_ */
|
||||
@ -50,6 +50,7 @@ enum FusionType {
|
||||
INSERT_FUSION,
|
||||
UPDATE_FUSION,
|
||||
DELETE_FUSION,
|
||||
INSERT_SUB_FUSION,
|
||||
AGG_INDEX_FUSION,
|
||||
SORT_INDEX_FUSION,
|
||||
|
||||
@ -114,6 +115,7 @@ enum FusionType {
|
||||
NOBYPASS_VERSION_SCAN_PLAN,
|
||||
NOBYPASS_PARTITION_TYPE_NOT_SUPPORT,
|
||||
NOBYPASS_REPLACE_NOT_SUPPORT,
|
||||
NOBYPASS_INSERT_SUB_FUSION_NOT_SUPPORT_PARTITION_BYPASS,
|
||||
NOBYPASS_GPC_NOT_SUPPORT_PARTITION_BYPASS
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user