From ed61cf61b22a100475272fdb3ae196b616de4128 Mon Sep 17 00:00:00 2001 From: Kenan Yao Date: Thu, 28 Jul 2016 16:05:55 +0800 Subject: [PATCH] Trivial format and comment cleanup. --- src/backend/cdb/dispatcher/cdbdisp_query.c | 16 ++++++++-------- src/backend/executor/execUtils.c | 13 +++---------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/backend/cdb/dispatcher/cdbdisp_query.c b/src/backend/cdb/dispatcher/cdbdisp_query.c index 90baed061a..11148c8cde 100644 --- a/src/backend/cdb/dispatcher/cdbdisp_query.c +++ b/src/backend/cdb/dispatcher/cdbdisp_query.c @@ -107,7 +107,7 @@ fillSliceVector(SliceTable *sliceTable, static char * buildGpQueryString(struct CdbDispatcherState *ds, - DispatchCommandQueryParms * pQueryParms, + DispatchCommandQueryParms *pQueryParms, int *finalLen); static void @@ -238,7 +238,7 @@ cdbdisp_dispatchPlan(struct QueryDesc *queryDesc, queryDesc->operation == CMD_DELETE) { MemoryContext oldContext; - List *cursors; + List *cursors; oldContext = CurrentMemoryContext; if (stmt->qdContext) @@ -552,10 +552,10 @@ CdbDispatchUtilityStatement(struct Node *stmt, */ static void cdbdisp_dispatchCommandInternal(const char *strCommand, - char *serializedQuerytree, - int serializedQuerytreelen, - int flags, - CdbPgResults *cdb_pgresults) + char *serializedQuerytree, + int serializedQuerytreelen, + int flags, + CdbPgResults *cdb_pgresults) { struct CdbDispatcherState ds = { NULL, NULL, NULL }; CdbDispatchResults* dispatchresults = NULL; @@ -1147,8 +1147,8 @@ cdbdisp_dispatchX(DispatchCommandQueryParms *pQueryParms, int iSlice; int rootIdx = pQueryParms->rootIdx; - char *queryText = NULL; - int queryTextLength = 0; + char *queryText = NULL; + int queryTextLength = 0; if (log_dispatch_stats) ResetUsage(); diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index f8aa312095..5da621e502 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -1665,7 +1665,8 @@ static void InventorySliceTree(Slice ** sliceMap, int sliceIndex, SliceReq * req static void AssociateSlicesToProcesses(Slice ** sliceMap, int sliceIndex, SliceReq * req); -/* Function AssignGangs runs on the QD and finishes construction of the +/* + * Function AssignGangs runs on the QD and finishes construction of the * global slice table for a plan by assigning gangs allocated by the * executor factory to the slices of the slice table. * @@ -1678,13 +1679,6 @@ static void AssociateSlicesToProcesses(Slice ** sliceMap, int sliceIndex, SliceR * allocate a minimal set of gangs that can satisfy any of the slice trees, * and associating the allocated gangs with slices in the slice table. * - * The argument utility_segment_index is the segment index to use for - * 1-gangs that run on QEs. - * - * TODO Currently (July 2005) this argument is always supplied as 0, but - * there are no cases of the planner specifying a fixed Motion to a - * QE, so we don't know the case works. - * * On successful exit, the CDBProcess lists (primaryProcesses, mirrorProcesses) * and the Gang pointers (primaryGang, mirrorGang) are set correctly in each * slice in the slice table. @@ -1702,7 +1696,7 @@ AssignGangs(QueryDesc *queryDesc) SliceReq req, inv; - /* Make a map so we can access slices quickly by index. */ + /* Make a map so we can access slices quickly by index. */ nslices = list_length(sliceTable->slices); sliceMap = (Slice **) palloc(nslices * sizeof(Slice *)); i = 0; @@ -1769,7 +1763,6 @@ AssignGangs(QueryDesc *queryDesc) } /* Use the gangs to construct the CdbProcess lists in slices. */ - inv.nxtNgang = 0; inv.nxt1gang_primary_reader = 0; inv.nxt1gang_entrydb_reader = 0; -- GitLab