We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7472429 commit 35ad7c1Copy full SHA for 35ad7c1
vortex-array/src/arrays/list/compute/take.rs
@@ -81,6 +81,19 @@ fn _take<I: IntegerPType, O: IntegerPType>(
81
let mut current_offset = 0u64;
82
new_offsets.append_zero();
83
84
+ // Approximate the total element count.
85
+ let approx_total_count = indices
86
+ .iter()
87
+ .map(|idx| {
88
+ let idx = idx
89
+ .to_usize()
90
+ .unwrap_or_else(|| vortex_panic!("Failed to convert index to usize: {}", idx));
91
+ (offsets[idx + 1] - offsets[idx]).as_() as usize
92
+ })
93
+ .max()
94
+ .unwrap_or(0)
95
+ * array.len();
96
+
97
for &data_idx in indices {
98
let data_idx = data_idx
99
.to_usize()
0 commit comments