comphead commented on code in PR #9498:
URL: https://github.com/apache/arrow-datafusion/pull/9498#discussion_r1517165576
##########
datafusion/physical-expr/src/window/lead_lag.rs:
##########
@@ -151,6 +149,64 @@ impl WindowShiftEvaluator {
}
}
+// implement ignore null for evaluate_all
+fn evaluate_all_with_ignore_null(
+ array: &ArrayRef,
+ offset: i64,
+ default_value: &ScalarValue,
+ is_lag: bool,
+) -> Result<ArrayRef, DataFusionError> {
+ let valid_indices: Vec<usize> = (0..array.len())
Review Comment:
`valid_indices` is everything in array which is not in `array.nulls()`
But there is a handy method you can use
```
array.nulls().unwrap().valid_indices().collect::<Vec<_>>()
```
--
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]