As you've probably seen, I have been working away on
https://github.com/apache/arrow/pull/1804

Most recently I had started adding type-safe traits for performing
operations on arrays.

For example:

trait ArrayOps<T> {
    fn compare(&self, other: &Array, f: &Fn(T,T) -> bool) ->
Result<Vec<bool>, Error>;
    fn compute(&self, other: &Array, f: &Fn(T,T) -> T) -> Result<Vec<T>,
Error>;
}

This makes it easy to perform operations on arrays using closures.

let a = Array::from(vec![1,2,3,4,5]);
let b = Array::from(vec![5,4,3,2,1]);
let c = a.compute(&b, &|a: i32,b: i32| a * b).unwrap();
assert_eq!(c, vec![5,8,9,8,5]);

I'm a bit concerned that I'm working alone on the PR and wanted to see if
there is a better way since there are others who are waiting to start
contributing.

I would really like to see the current PR merged so that they can jump in
too.

What exactly is the approval process? I know this is slightly tricky
because this PR is for a language that the current contributors generally
don't have experience with.

Thanks,

Andy.

Reply via email to