xudong963 opened a new issue, #23705: URL: https://github.com/apache/datafusion/issues/23705
### Describe the bug The whole-partition evaluation path for `LEAD` and `LAG` with `IGNORE NULLS` calls `array.nulls().unwrap()`. Arrow arrays containing no null values commonly omit the null bitmap, so evaluating either function on such an array panics. ### To Reproduce Evaluate `LEAD` or `LAG` with `IGNORE NULLS` through `PartitionEvaluator::evaluate_all` using an array constructed without nulls, for example: ```rust let array = Int32Array::from(vec![1, 2, 3]); assert!(array.nulls().is_none()); ``` The evaluation panics with: ```text called `Option::unwrap()` on a `None` value ``` ### Expected behavior `IGNORE NULLS` should behave like the regular shift when the input contains no null values, returning the expected `LEAD` or `LAG` result without requiring a null bitmap. ### Additional context The panic is in `evaluate_all_with_ignore_null` in `datafusion/functions-window/src/lead_lag.rs`. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
