Process extends using batch operations
(
mutable: &mut _MutableArrayData,
source_array_idx: usize,
run_ends_bytes: Vec<u8>,
values_range: Option<(usize, usize)>,
)
| 154 | |
| 155 | /// Process extends using batch operations |
| 156 | fn process_extends_batch<T: ArrowNativeType>( |
| 157 | mutable: &mut _MutableArrayData, |
| 158 | source_array_idx: usize, |
| 159 | run_ends_bytes: Vec<u8>, |
| 160 | values_range: Option<(usize, usize)>, |
| 161 | ) { |
| 162 | if run_ends_bytes.is_empty() { |
| 163 | return; |
| 164 | } |
| 165 | |
| 166 | // Batch extend the run_ends array with all bytes at once |
| 167 | mutable.child_data[0] |
| 168 | .data |
| 169 | .buffer1 |
| 170 | .extend_from_slice(&run_ends_bytes); |
| 171 | mutable.child_data[0].data.len += run_ends_bytes.len() / std::mem::size_of::<T>(); |
| 172 | |
| 173 | // Batch extend the values array using the range |
| 174 | let (start_idx, end_idx) = |
| 175 | values_range.expect("values_range should be Some if run_ends_bytes is not empty"); |
| 176 | mutable.child_data[1].extend(source_array_idx, start_idx, end_idx); |
| 177 | } |
| 178 | |
| 179 | /// Returns a function that extends the run encoded array. |
| 180 | /// |
nothing calls this directly
no test coverage detected