diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-05-12 13:14:10 -0400 |
commit | def5b065ff22a16a80084587613599fe15627213 (patch) | |
tree | 13f424449b7fb90c85659071b6adf4e27ae6d272 /src/backend/executor/nodeAgg.c | |
parent | e6ccd1ce1644d1b40b7981f8bc172394de524f99 (diff) | |
download | postgresql-def5b065ff22a16a80084587613599fe15627213.tar.gz postgresql-def5b065ff22a16a80084587613599fe15627213.zip |
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files".
The only change worthy of note is that pgindent messed up the formatting
of launcher.c's struct LogicalRepWorkerId, which led me to notice that
that struct wasn't used at all anymore, so I just took it out.
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r-- | src/backend/executor/nodeAgg.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index d80adc519dd..8440a76fbdc 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -349,7 +349,7 @@ typedef struct HashAggSpill int64 *ntuples; /* number of tuples in each partition */ uint32 mask; /* mask to find partition from hash value */ int shift; /* after masking, shift by this amount */ - hyperLogLogState *hll_card; /* cardinality estimate for contents */ + hyperLogLogState *hll_card; /* cardinality estimate for contents */ } HashAggSpill; /* @@ -374,9 +374,9 @@ typedef struct HashAggBatch /* used to find referenced colnos */ typedef struct FindColsContext { - bool is_aggref; /* is under an aggref */ - Bitmapset *aggregated; /* column references under an aggref */ - Bitmapset *unaggregated; /* other column references */ + bool is_aggref; /* is under an aggref */ + Bitmapset *aggregated; /* column references under an aggref */ + Bitmapset *unaggregated; /* other column references */ } FindColsContext; static void select_current_set(AggState *aggstate, int setno, bool is_hash); @@ -1397,7 +1397,7 @@ project_aggregates(AggState *aggstate) static void find_cols(AggState *aggstate, Bitmapset **aggregated, Bitmapset **unaggregated) { - Agg *agg = (Agg *) aggstate->ss.ps.plan; + Agg *agg = (Agg *) aggstate->ss.ps.plan; FindColsContext context; context.is_aggref = false; @@ -1579,7 +1579,8 @@ find_hash_columns(AggState *aggstate) for (int i = 0; i < scanDesc->natts; i++) { - int colno = i + 1; + int colno = i + 1; + if (bms_is_member(colno, aggstate->colnos_needed)) aggstate->max_colno_needed = colno; else @@ -3158,10 +3159,10 @@ hashagg_spill_finish(AggState *aggstate, HashAggSpill *spill, int setno) for (i = 0; i < spill->npartitions; i++) { - LogicalTapeSet *tapeset = aggstate->hash_tapeinfo->tapeset; - int tapenum = spill->partitions[i]; - HashAggBatch *new_batch; - double cardinality; + LogicalTapeSet *tapeset = aggstate->hash_tapeinfo->tapeset; + int tapenum = spill->partitions[i]; + HashAggBatch *new_batch; + double cardinality; /* if the partition is empty, don't create a new batch of work */ if (spill->ntuples[i] == 0) |