Exemplo n.º 1
0
/*
 * print the basic stuff of all nodes that inherit from Plan
 */
static void
_outPlanInfo(StringInfo str, Plan *node)
{
	if (print_variable_fields)
	{
		WRITE_INT_FIELD(plan_node_id);
		WRITE_INT_FIELD(plan_parent_node_id);

		WRITE_FLOAT_FIELD(startup_cost, "%.2f");
		WRITE_FLOAT_FIELD(total_cost, "%.2f");
		WRITE_FLOAT_FIELD(plan_rows, "%.0f");
		WRITE_INT_FIELD(plan_width);
	}

	WRITE_NODE_FIELD(targetlist);
	WRITE_NODE_FIELD(qual);

	WRITE_BITMAPSET_FIELD(extParam);
	WRITE_BITMAPSET_FIELD(allParam);

	WRITE_INT_FIELD(nParamExec);

	if (print_variable_fields)
	{
		WRITE_NODE_FIELD(flow);
		WRITE_INT_FIELD(dispatch);
		WRITE_BOOL_FIELD(directDispatch.isDirectDispatch);
		WRITE_NODE_FIELD(directDispatch.contentIds);

		WRITE_INT_FIELD(nMotionNodes);
		WRITE_INT_FIELD(nInitPlans);

		WRITE_NODE_FIELD(sliceTable);
	}

    WRITE_NODE_FIELD(lefttree);
    WRITE_NODE_FIELD(righttree);
    WRITE_NODE_FIELD(initPlan);

	if (print_variable_fields)
	{
		WRITE_UINT64_FIELD(operatorMemKB);
	}
}
Exemplo n.º 2
0
static void
_outCustomScan(StringInfo str, CustomScan *node)
{
	WRITE_NODE_TYPE("CUSTOMSCAN");

	_outScanInfo(str, (Scan *) node);

	WRITE_UINT_FIELD(flags);
	WRITE_NODE_FIELD(custom_plans);
	WRITE_NODE_FIELD(custom_exprs);
	WRITE_NODE_FIELD(custom_private);
	WRITE_NODE_FIELD(custom_scan_tlist);
	WRITE_BITMAPSET_FIELD(custom_relids);

	// serialize CustomScanMethods
	WRITE_STRING_FIELD(methods->CustomName);
	WRITE_STRING_FIELD(methods->LibraryName);
	WRITE_STRING_FIELD(methods->SymbolName);
}
Exemplo n.º 3
0
Arquivo: outfast.c Projeto: LJoNe/gpdb
static void
_outPlannedStmt(StringInfo str, PlannedStmt *node)
{
	WRITE_NODE_TYPE("PLANNEDSTMT");

	WRITE_ENUM_FIELD(commandType, CmdType);
	WRITE_ENUM_FIELD(planGen, PlanGenerator);
	WRITE_BOOL_FIELD(canSetTag);
	WRITE_BOOL_FIELD(transientPlan);

	WRITE_NODE_FIELD(planTree);

	WRITE_NODE_FIELD(rtable);

	WRITE_NODE_FIELD(resultRelations);
	WRITE_NODE_FIELD(utilityStmt);
	WRITE_NODE_FIELD(intoClause);
	WRITE_NODE_FIELD(subplans);
	WRITE_BITMAPSET_FIELD(rewindPlanIDs);
	WRITE_NODE_FIELD(returningLists);

	WRITE_NODE_FIELD(result_partitions);
	WRITE_NODE_FIELD(result_aosegnos);
	WRITE_NODE_FIELD(queryPartOids);
	WRITE_NODE_FIELD(queryPartsMetadata);
	WRITE_NODE_FIELD(numSelectorsPerScanId);
	WRITE_NODE_FIELD(rowMarks);
	WRITE_NODE_FIELD(relationOids);
	/*
	 * Don't serialize invalItems. The TIDs of the invalidated items wouldn't
	 * make sense in segments.
	 */
	WRITE_INT_FIELD(nParamExec);
	WRITE_INT_FIELD(nMotionNodes);
	WRITE_INT_FIELD(nInitPlans);

	/* Don't serialize policy */

	WRITE_UINT64_FIELD(query_mem);
}