主权项 |
1. A computer-implemented method for processing data that is sorted according to a sort order, including:
partitioning, by a parallel partition element of a computer system, sorted data among a plurality of parallel flows to generate a plurality of partitioned subsets of the sorted data, the sorted data including work elements, each work element including a sort key value, wherein the sorted data are sorted based on the sort key values, the partitioned subsets of the sorted data are provided at a plurality of outputs of the parallel partition element, each partitioned subset of the sorted data is provided to one of the outputs of the parallel partition element, different partitioned subsets of the sorted data are provided to different outputs of the parallel partition element, and each output of the parallel partition element is associated with a respective one of the plurality of parallel flows; providing a sort value indicator for each of the parallel flows, the sort value indicator indicating a value in the sort order that has been reached by at least one of the outputs of the parallel partition element; passing, by the computer system, the sort value indicator on each of the plurality of parallel flows associated with the outputs of the parallel partition element; and merging, by a sorted merge element of the computer system, work elements from at least two of the parallel flows to generate a merged output, including determining whether a work element from a first one of the parallel flows can be passed to the merged output based on at least one sort value indicator in a second one of the parallel flows, wherein the sort value indicator identifies a place in the sort order for the data such that subsequent data in the second one of the parallel flows occur no earlier than the identified place in the sort order. |