ClSlaid commented on code in PR #9755:
URL: https://github.com/apache/arrow-rs/pull/9755#discussion_r3343322154
##########
arrow-select/src/coalesce/primitive.rs:
##########
@@ -94,6 +135,43 @@ impl<T: ArrowPrimitiveType + Debug> InProgressArray for
InProgressPrimitiveArray
Ok(())
}
+ fn copy_rows_by_filter(&mut self, filter: &FilterPredicate) -> Result<(),
ArrowError> {
+ match RowSelection::from_filter(filter) {
+ RowSelection::Indices(indices) => {
+ let s = self
+ .source
+ .as_ref()
+ .ok_or_else(|| {
+ ArrowError::InvalidArgumentError(
+ "Internal Error: InProgressPrimitiveArray: source
not set".to_string(),
+ )
+ })?
+ .as_primitive::<T>();
+
+ append_filtered_nulls(&mut self.nulls, s.nulls(), filter);
+ self.append_values_by_indices(indices.iter().copied())
+ }
+ RowSelection::IndexIterator {
+ filter: filter_array,
+ count,
+ } => {
+ let s = self
Review Comment:
This should be done from source, currently the `RowSelection` is just a
cheap replica of `filter.strategy`.
After polish that struct, we can reduce branches by half. I'll push once I
make the performance satisfying to me.
--
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]