Rich-T-kid commented on code in PR #11696:
URL: https://github.com/apache/arrow-rs/pull/11696#discussion_r4338776945
##########
arrow-select/src/coalesce.rs:
##########
@@ -23,26 +23,37 @@
use crate::filter::{FilterBuilder, FilterPredicate, FilterSelection};
use crate::interleave::interleave_record_batch;
use crate::take::take_record_batch;
-use arrow_array::types::{BinaryViewType, StringViewType};
+use arrow_array::types::{BinaryViewType, GenericBinaryType, GenericStringType,
StringViewType};
use arrow_array::{Array, ArrayRef, BooleanArray, RecordBatch,
downcast_primitive};
use arrow_schema::{ArrowError, DataType, SchemaRef};
use std::collections::VecDeque;
use std::sync::Arc;
// Originally From DataFusion's coalesce module:
//
https://github.com/apache/datafusion/blob/9d2f04996604e709ee440b65f41e7b882f50b788/datafusion/physical-plan/src/coalesce/mod.rs#L26-L25
+mod byte;
mod byte_view;
mod fixed_size_binary;
mod generic;
mod primitive;
+use byte::InProgressByteArray;
use byte_view::InProgressByteViewArray;
use fixed_size_binary::InProgressFixedSizeBinaryArray;
use generic::GenericInProgressArray;
use primitive::InProgressPrimitiveArray;
fn has_sparse_filter_copy(data_type: &DataType) -> bool {
- data_type.is_primitive() || matches!(data_type, DataType::Utf8View |
DataType::BinaryView)
+ data_type.is_primitive()
+ || is_byte_array(data_type)
+ || matches!(data_type, DataType::Utf8View | DataType::BinaryView)
+}
+
+fn is_byte_array(data_type: &DataType) -> bool {
+ matches!(
+ data_type,
+ DataType::Utf8 | DataType::LargeUtf8 | DataType::Binary |
DataType::LargeBinary
+ )
Review Comment:
Inlined the byte-array matches at both call sites in d8037488b3.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]