Expand description
A physical plan for window sort(Which is sorting multiple sorted ranges according to input PartitionRange
).
Structsยง
- Sorted
RunSet ๐ - SucRun ๐A struct to represent a successive run in the input iterator
- Time
Range ๐Left(start
) inclusive right(end
) exclusive, - A complex stream sort execution plan which accepts a list of
PartitionRange
and merge sort them whenever possible, and emit the sorted result as soon as possible. This sorting plan only accept sort by ts and will not sort by other fields. - The core logic of merging sort multiple sorted ranges
Enumsยง
- Action ๐
Functionsยง
- cmp_
with_ ๐opts Compare with options, note None is considered as NULL here - Compute all working ranges and corresponding working sets from given
overlap_counts
computed fromsplit_overlapping_ranges
- Find the slice(where start <= data < end and sort by
sort_column.options
) from the given range - find_
successive_ ๐runs find all successive runs in the input iterator - get_
sorted_ ๐runs return a list of non-overlapping (offset, length) which represent sorted runs, and can be used to call [DfRecordBatch::slice
] to get sorted runs Returned runs will be as long as possible, and will not overlap with each other - Get timestamp from array at offset
- split batch to sorted runs
- return a map of non-overlapping ranges and their corresponding index (not
PartitionRange.identifier
but position in array) in the inputPartitionRange
s that is in those ranges - split_
range_ ๐by split input range bysplit_by
range to one, two or three parts.