Пример #1
0
static void
_outIndexOptInfo(StringInfo str, IndexOptInfo *node)
{
	WRITE_NODE_TYPE("INDEXOPTINFO");

	/* NB: this isn't a complete set of fields */
	WRITE_OID_FIELD(indexoid);
	/* Do NOT print rel field, else infinite recursion */
	WRITE_UINT_FIELD(pages);
	WRITE_FLOAT_FIELD(tuples, "%.0f");
	WRITE_INT_FIELD(ncolumns);

	WRITE_OID_ARRAY(opfamily, node->ncolumns);
	WRITE_INT_ARRAY(indexkeys, node->ncolumns, int);
	WRITE_OID_ARRAY(fwdsortop, node->ncolumns);
	WRITE_OID_ARRAY(revsortop, node->ncolumns);

    WRITE_OID_FIELD(relam);
	WRITE_OID_FIELD(amcostestimate);
	WRITE_NODE_FIELD(indexprs);
	WRITE_NODE_FIELD(indpred);
	WRITE_BOOL_FIELD(predOK);
	WRITE_BOOL_FIELD(unique);
	WRITE_BOOL_FIELD(amoptionalkey);
	WRITE_BOOL_FIELD(cdb_default_stats_used);
}
Пример #2
0
static void
_outSort(StringInfo str, Sort *node)
{

	WRITE_NODE_TYPE("SORT");

	_outPlanInfo(str, (Plan *) node);

	WRITE_INT_FIELD(numCols);

	WRITE_INT_ARRAY(sortColIdx, numCols, AttrNumber);

	WRITE_OID_ARRAY(sortOperators, numCols);

    /* CDB */
	WRITE_NODE_FIELD(limitOffset);
	WRITE_NODE_FIELD(limitCount);
    WRITE_BOOL_FIELD(noduplicates);

	WRITE_ENUM_FIELD(share_type, ShareType);
	WRITE_INT_FIELD(share_id);
	WRITE_INT_FIELD(driver_slice);
	WRITE_INT_FIELD(nsharer);
	WRITE_INT_FIELD(nsharer_xslice);
}
Пример #3
0
static void
_outMotion(StringInfo str, Motion *node)
{

	WRITE_NODE_TYPE("MOTION");

	WRITE_INT_FIELD(motionID);
	WRITE_ENUM_FIELD(motionType, MotionType);
	WRITE_BOOL_FIELD(sendSorted);

	WRITE_NODE_FIELD(hashExpr);
	WRITE_NODE_FIELD(hashDataTypes);

	WRITE_INT_FIELD(numOutputSegs);
	WRITE_INT_ARRAY(outputSegIdx, node->numOutputSegs, int);

	WRITE_INT_FIELD(numSortCols);
	WRITE_INT_ARRAY(sortColIdx, node->numSortCols, AttrNumber);
	WRITE_OID_ARRAY(sortOperators, node->numSortCols);
	WRITE_BOOL_ARRAY(nullsFirst, node->numSortCols);

	WRITE_INT_FIELD(segidColIdx);

	_outPlanInfo(str, (Plan *) node);
}
Пример #4
0
static void
_outAgg(StringInfo str, Agg *node)
{

	WRITE_NODE_TYPE("AGG");

	_outPlanInfo(str, (Plan *) node);

	WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
	WRITE_INT_FIELD(numCols);

	WRITE_INT_ARRAY(grpColIdx, node->numCols, AttrNumber);
	WRITE_OID_ARRAY(grpOperators, node->numCols);

	if (print_variable_fields)
	{
		WRITE_LONG_FIELD(numGroups);
		WRITE_INT_FIELD(transSpace);
	}
	WRITE_INT_FIELD(numNullCols);
	WRITE_UINT64_FIELD(inputGrouping);
	WRITE_UINT64_FIELD(grouping);
	WRITE_BOOL_FIELD(inputHasGrouping);
	WRITE_INT_FIELD(rollupGSTimes);
	WRITE_BOOL_FIELD(lastAgg);
	WRITE_BOOL_FIELD(streaming);
}
Пример #5
0
static void
_outWindowKey(StringInfo str, WindowKey *node)
{
	WRITE_NODE_TYPE("WINDOWKEY");
	WRITE_INT_FIELD(numSortCols);

	WRITE_INT_ARRAY(sortColIdx, numSortCols, AttrNumber);
	WRITE_OID_ARRAY(sortOperators, numSortCols);
	WRITE_NODE_FIELD(frame);
}
Пример #6
0
static void
_outUnique(StringInfo str, Unique *node)
{

	WRITE_NODE_TYPE("UNIQUE");

	_outPlanInfo(str, (Plan *) node);

	WRITE_INT_FIELD(numCols);
	WRITE_INT_ARRAY(uniqColIdx, node->numCols, AttrNumber);
	WRITE_OID_ARRAY(uniqOperators, node->numCols);
}
Пример #7
0
static void
_outWindow(StringInfo str, Window *node)
{
	WRITE_NODE_TYPE("WINDOW");

	_outPlanInfo(str, (Plan *) node);

	WRITE_INT_FIELD(numPartCols);
	WRITE_INT_ARRAY(partColIdx, node->numPartCols, AttrNumber);
	WRITE_OID_ARRAY(partOperators, node->numPartCols);

	WRITE_NODE_FIELD(windowKeys);
}
Пример #8
0
static void
_outPartition(StringInfo str, Partition *node)
{
	WRITE_NODE_TYPE("PARTITION");

	WRITE_OID_FIELD(partid);
	WRITE_OID_FIELD(parrelid);
	WRITE_CHAR_FIELD(parkind);
	WRITE_INT_FIELD(parlevel);
	WRITE_BOOL_FIELD(paristemplate);
	WRITE_BINARY_FIELD(parnatts, sizeof(int2));
	WRITE_INT_ARRAY(paratts, parnatts, int2);
	WRITE_OID_ARRAY(parclass, parnatts);
}
Пример #9
0
static void
_outSetOp(StringInfo str, SetOp *node)
{

	WRITE_NODE_TYPE("SETOP");

	_outPlanInfo(str, (Plan *) node);

	WRITE_ENUM_FIELD(cmd, SetOpCmd);
	WRITE_INT_FIELD(numCols);
	WRITE_INT_ARRAY(dupColIdx, node->numCols, AttrNumber);
	WRITE_OID_ARRAY(dupOperators, node->numCols);

	WRITE_INT_FIELD(flagColIdx);
}
Пример #10
0
static void
_outMergeJoin(StringInfo str, MergeJoin *node)
{
	int			numCols;

	WRITE_NODE_TYPE("MERGEJOIN");

	_outJoinPlanInfo(str, (Join *) node);

	WRITE_NODE_FIELD(mergeclauses);

	numCols = list_length(node->mergeclauses);

	WRITE_OID_ARRAY(mergeFamilies, numCols);
	WRITE_INT_ARRAY(mergeStrategies, numCols, int);
	WRITE_BOOL_ARRAY(mergeNullsFirst, numCols);

	WRITE_BOOL_FIELD(unique_outer);
}
Пример #11
0
static void
_outFlow(StringInfo str, Flow *node)
{

	WRITE_NODE_TYPE("FLOW");

	WRITE_ENUM_FIELD(flotype, FlowType);
	WRITE_ENUM_FIELD(req_move, Movement);
	WRITE_ENUM_FIELD(locustype, CdbLocusType);
	WRITE_INT_FIELD(segindex);

	/* This array format as in Group and Sort nodes. */
	WRITE_INT_FIELD(numSortCols);

	WRITE_INT_ARRAY(sortColIdx, numSortCols, AttrNumber);
	WRITE_OID_ARRAY(sortOperators, numSortCols);


	WRITE_NODE_FIELD(hashExpr);

	WRITE_NODE_FIELD(flow_before_req_move);
}