(
truthy: &FixedSizeBinaryArray,
mask: &BooleanBuffer,
output_len: usize,
selectivity: f64,
)
| 312 | } |
| 313 | |
| 314 | fn scatter_fixed_size_binary( |
| 315 | truthy: &FixedSizeBinaryArray, |
| 316 | mask: &BooleanBuffer, |
| 317 | output_len: usize, |
| 318 | selectivity: f64, |
| 319 | ) -> FixedSizeBinaryArray { |
| 320 | let value_length = truthy.value_length() as usize; |
| 321 | let mut output = vec![0u8; output_len * value_length]; |
| 322 | let mut src_idx = 0; |
| 323 | |
| 324 | if selectivity > SCATTER_SLICES_SELECTIVITY_THRESHOLD { |
| 325 | for (start, end) in mask.set_slices() { |
| 326 | for dst_idx in start..end { |
| 327 | let src_bytes = truthy.value(src_idx); |
| 328 | let dst_start = dst_idx * value_length; |
| 329 | output[dst_start..dst_start + value_length].copy_from_slice(src_bytes); |
| 330 | src_idx += 1; |
| 331 | } |
| 332 | } |
| 333 | } else { |
| 334 | for dst_idx in mask.set_indices() { |
| 335 | let src_bytes = truthy.value(src_idx); |
| 336 | let dst_start = dst_idx * value_length; |
| 337 | output[dst_start..dst_start + value_length].copy_from_slice(src_bytes); |
| 338 | src_idx += 1; |
| 339 | } |
| 340 | } |
| 341 | let nulls = scatter_null_mask(truthy.nulls(), mask, output_len, selectivity); |
| 342 | |
| 343 | FixedSizeBinaryArray::new(truthy.value_length(), Buffer::from(output), nulls) |
| 344 | } |
| 345 | |
| 346 | fn scatter_dict<K: ArrowDictionaryKeyType>( |
| 347 | truthy: &DictionaryArray<K>, |
nothing calls this directly
no test coverage detected
searching dependent graphs…