@@ -270,7 +270,7 @@ isCurrentGroup(IncrementalSortState *node, TupleTableSlot *pivot, TupleTableSlot
270
270
* verify they're all part of the same prefix key group before sorting them
271
271
* solely by unsorted suffix keys.
272
272
*
273
- * While it's likely that all already fetch tuples are all part of a single
273
+ * While it's likely that all tuples already fetched are all part of a single
274
274
* prefix group, we also have to handle the possibility that there is at least
275
275
* one different prefix key group before the large prefix key group.
276
276
* ----------------------------------------------------------------
@@ -381,7 +381,7 @@ switchToPresortedPrefixMode(PlanState *pstate)
381
381
* node->transfer_tuple slot, and, even though that slot
382
382
* points to memory inside the full sort tuplesort, we can't
383
383
* reset that tuplesort anyway until we've fully transferred
384
- * out of its tuples, so this reference is safe. We do need to
384
+ * out its tuples, so this reference is safe. We do need to
385
385
* reset the group pivot tuple though since we've finished the
386
386
* current prefix key group.
387
387
*/
@@ -603,7 +603,7 @@ ExecIncrementalSort(PlanState *pstate)
603
603
/*
604
604
* Initialize presorted column support structures for
605
605
* isCurrentGroup(). It's correct to do this along with the
606
- * initial intialization for the full sort state (and not for the
606
+ * initial initialization for the full sort state (and not for the
607
607
* prefix sort state) since we always load the full sort state
608
608
* first.
609
609
*/
@@ -723,7 +723,7 @@ ExecIncrementalSort(PlanState *pstate)
723
723
nTuples ++ ;
724
724
725
725
/*
726
- * If we've reach our minimum group size, then we need to
726
+ * If we've reached our minimum group size, then we need to
727
727
* store the most recent tuple as a pivot.
728
728
*/
729
729
if (nTuples == minGroupSize )
@@ -752,7 +752,7 @@ ExecIncrementalSort(PlanState *pstate)
752
752
{
753
753
/*
754
754
* Since the tuple we fetched isn't part of the current
755
- * prefix key group we don't want to sort it as part of
755
+ * prefix key group we don't want to sort it as part of
756
756
* the current batch. Instead we use the group_pivot slot
757
757
* to carry it over to the next batch (even though we
758
758
* won't actually treat it as a group pivot).
@@ -792,12 +792,12 @@ ExecIncrementalSort(PlanState *pstate)
792
792
}
793
793
794
794
/*
795
- * Unless we've alrady transitioned modes to reading from the full
795
+ * Unless we've already transitioned modes to reading from the full
796
796
* sort state, then we assume that having read at least
797
797
* DEFAULT_MAX_FULL_SORT_GROUP_SIZE tuples means it's likely we're
798
798
* processing a large group of tuples all having equal prefix keys
799
799
* (but haven't yet found the final tuple in that prefix key
800
- * group), so we need to transition in to presorted prefix mode.
800
+ * group), so we need to transition into presorted prefix mode.
801
801
*/
802
802
if (nTuples > DEFAULT_MAX_FULL_SORT_GROUP_SIZE &&
803
803
node -> execution_status != INCSORT_READFULLSORT )
@@ -849,7 +849,7 @@ ExecIncrementalSort(PlanState *pstate)
849
849
850
850
/*
851
851
* We might have multiple prefix key groups in the full sort
852
- * state, so the mode transition function needs to know the it
852
+ * state, so the mode transition function needs to know that it
853
853
* needs to move from the fullsort to presorted prefix sort.
854
854
*/
855
855
node -> n_fullsort_remaining = nTuples ;
@@ -913,7 +913,7 @@ ExecIncrementalSort(PlanState *pstate)
913
913
/*
914
914
* If the tuple's prefix keys match our pivot tuple, we're not
915
915
* done yet and can load it into the prefix sort state. If not, we
916
- * don't want to sort it as part of the current batch. Instead we
916
+ * don't want to sort it as part of the current batch. Instead we
917
917
* use the group_pivot slot to carry it over to the next batch
918
918
* (even though we won't actually treat it as a group pivot).
919
919
*/
@@ -1121,14 +1121,14 @@ ExecReScanIncrementalSort(IncrementalSortState *node)
1121
1121
PlanState * outerPlan = outerPlanState (node );
1122
1122
1123
1123
/*
1124
- * Incremental sort doesn't support efficient rescan even when paramters
1124
+ * Incremental sort doesn't support efficient rescan even when parameters
1125
1125
* haven't changed (e.g., rewind) because unlike regular sort we don't
1126
1126
* store all tuples at once for the full sort.
1127
1127
*
1128
1128
* So even if EXEC_FLAG_REWIND is set we just reset all of our state and
1129
1129
* reexecute the sort along with the child node below us.
1130
1130
*
1131
- * In theory if we've only fill the full sort with one batch (and haven't
1131
+ * In theory if we've only filled the full sort with one batch (and haven't
1132
1132
* reset it for a new batch yet) then we could efficiently rewind, but
1133
1133
* that seems a narrow enough case that it's not worth handling specially
1134
1134
* at this time.
0 commit comments