@@ -270,7 +270,7 @@ isCurrentGroup(IncrementalSortState *node, TupleTableSlot *pivot, TupleTableSlot
270270 * verify they're all part of the same prefix key group before sorting them
271271 * solely by unsorted suffix keys.
272272 *
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
274274 * prefix group, we also have to handle the possibility that there is at least
275275 * one different prefix key group before the large prefix key group.
276276 * ----------------------------------------------------------------
@@ -381,7 +381,7 @@ switchToPresortedPrefixMode(PlanState *pstate)
381381 * node->transfer_tuple slot, and, even though that slot
382382 * points to memory inside the full sort tuplesort, we can't
383383 * 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
385385 * reset the group pivot tuple though since we've finished the
386386 * current prefix key group.
387387 */
@@ -603,7 +603,7 @@ ExecIncrementalSort(PlanState *pstate)
603603 /*
604604 * Initialize presorted column support structures for
605605 * 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
607607 * prefix sort state) since we always load the full sort state
608608 * first.
609609 */
@@ -723,7 +723,7 @@ ExecIncrementalSort(PlanState *pstate)
723723 nTuples ++ ;
724724
725725 /*
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
727727 * store the most recent tuple as a pivot.
728728 */
729729 if (nTuples == minGroupSize )
@@ -752,7 +752,7 @@ ExecIncrementalSort(PlanState *pstate)
752752 {
753753 /*
754754 * 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
756756 * the current batch. Instead we use the group_pivot slot
757757 * to carry it over to the next batch (even though we
758758 * won't actually treat it as a group pivot).
@@ -792,12 +792,12 @@ ExecIncrementalSort(PlanState *pstate)
792792 }
793793
794794 /*
795- * Unless we've alrady transitioned modes to reading from the full
795+ * Unless we've already transitioned modes to reading from the full
796796 * sort state, then we assume that having read at least
797797 * DEFAULT_MAX_FULL_SORT_GROUP_SIZE tuples means it's likely we're
798798 * processing a large group of tuples all having equal prefix keys
799799 * (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.
801801 */
802802 if (nTuples > DEFAULT_MAX_FULL_SORT_GROUP_SIZE &&
803803 node -> execution_status != INCSORT_READFULLSORT )
@@ -849,7 +849,7 @@ ExecIncrementalSort(PlanState *pstate)
849849
850850 /*
851851 * 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
853853 * needs to move from the fullsort to presorted prefix sort.
854854 */
855855 node -> n_fullsort_remaining = nTuples ;
@@ -913,7 +913,7 @@ ExecIncrementalSort(PlanState *pstate)
913913 /*
914914 * If the tuple's prefix keys match our pivot tuple, we're not
915915 * 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
917917 * use the group_pivot slot to carry it over to the next batch
918918 * (even though we won't actually treat it as a group pivot).
919919 */
@@ -1121,14 +1121,14 @@ ExecReScanIncrementalSort(IncrementalSortState *node)
11211121 PlanState * outerPlan = outerPlanState (node );
11221122
11231123 /*
1124- * Incremental sort doesn't support efficient rescan even when paramters
1124+ * Incremental sort doesn't support efficient rescan even when parameters
11251125 * haven't changed (e.g., rewind) because unlike regular sort we don't
11261126 * store all tuples at once for the full sort.
11271127 *
11281128 * So even if EXEC_FLAG_REWIND is set we just reset all of our state and
11291129 * reexecute the sort along with the child node below us.
11301130 *
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
11321132 * reset it for a new batch yet) then we could efficiently rewind, but
11331133 * that seems a narrow enough case that it's not worth handling specially
11341134 * at this time.
0 commit comments