MCPcopy Create free account
hub / github.com/apache/datafusion / partitions_to_sorted_vec

Function partitions_to_sorted_vec

test-utils/src/lib.rs:48–56  ·  view source on GitHub ↗

extract i32 values from batches and sort them

(partitions: &[Vec<RecordBatch>])

Source from the content-addressed store, hash-verified

46
47/// extract i32 values from batches and sort them
48pub fn partitions_to_sorted_vec(partitions: &[Vec<RecordBatch>]) -> Vec<Option<i32>> {
49 let mut values: Vec<_> = partitions
50 .iter()
51 .flat_map(|batches| batches_to_vec(batches).into_iter())
52 .collect();
53
54 values.sort_unstable();
55 values
56}
57
58/// Adds a random number of empty record batches into the stream
59pub fn add_empty_batches(

Callers 4

test_sort_10k_memFunction · 0.85
test_sort_100k_memFunction · 0.85
test_sort_unlimited_memFunction · 0.85
run_merge_testFunction · 0.85

Calls 4

batches_to_vecFunction · 0.85
collectMethod · 0.80
iterMethod · 0.45
into_iterMethod · 0.45

Tested by 4

test_sort_10k_memFunction · 0.68
test_sort_100k_memFunction · 0.68
test_sort_unlimited_memFunction · 0.68
run_merge_testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…