alamb opened a new issue, #161:
URL: https://github.com/apache/arrow-rs/issues/161

   *Note*: migrated from original JIRA: 
https://issues.apache.org/jira/browse/ARROW-11051
   
   Minimal example
   
    
   {quote}use arrow::\{array::PrimitiveArray, datatypes::Int64Type};
   
   fn main() \{
        let mut s = vec![];
        for _ in 0..32  
         
        \{
            s.push(Some(1i64));         s.push(None);     
        }
        let v: PrimitiveArray<Int64Type> = s.into();
        dbg!(arrow::compute::sum(&v));
    }
     
   {quote}
    dependency
   {quote}arrow = \{version = "2", features = ["simd"]}
   {quote}
   The following code in `compute::sum` is wrong. The bit mask is checked 
reversed.
   {quote}            remainder.iter().enumerate().for_each(|(i, value)| \{
                    if remainder_bits & (1 << i) != 0  \{
   
                       remainder_sum = remainder_sum + *value;
   
                    }
   
               });
     
   {quote}


-- 
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: github-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to