You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/02 17:34:47 UTC

[GitHub] [arrow-datafusion] matthewmturner commented on pull request #1729: Add median operator

matthewmturner commented on pull request #1729:
URL: https://github.com/apache/arrow-datafusion/pull/1729#issuecomment-1028183168


   @realno this is great, thank you.  im excited to be able to refresh the db-benchmarks results with this and your other work.  just a couple questions.
   
   I believe all the tests currently have the array data sorted already.  Do you think we should have some where it is not sorted?  i'm assuming that the `Median` function and `approx_percentile_cont` dont require input data to be sorted in order to use (sry if thats wrong assumption, i havent had chance to look into implementation of `approx_percentile_cont`).
   
   Can you also provide more color on the intended handling of nulls?  It would help me to understand the below test.
   
   ```
   #[test]
       fn median_i32_with_nulls() -> Result<()> {
           let a: ArrayRef = Arc::new(Int32Array::from(vec![
               Some(1),
               None,
               Some(3),
               Some(4),
               Some(5),
           ]));
           generic_test_op!(
               a,
               DataType::Int32,
               Median,
               ScalarValue::from(3),
               DataType::Int32
           )
       }
   ```


-- 
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-unsubscribe@arrow.apache.org

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