mustafasrepo opened a new issue, #9456:
URL: https://github.com/apache/arrow-datafusion/issues/9456

   ### Is your feature request related to a problem or challenge?
   
   Currently `LEAD` and `LAG` window functions have `IGNORE NULLS` support when 
they are calculated from `BoundedWindowAggExec`. However, when they are 
calculated from `WindowAggExec` they don't have this support.
   
   Currently datafusion gives error: `IGNORE NULLS mode for LAG and LEAD is not 
supported for WindowAggExec` when `WindowAggExec` is used with ignore nulls 
option.
   
   As an example test below in the `window.slt` file
   ```sql
   select lag(a, 2, null) ignore nulls over (order by id desc) as x1,
          lag(a, 2, 'def') ignore nulls over (order by id desc) as x2,
          lag(a, 2, null) respect nulls over (order by id desc) as x4,
          lag(a, 2, 'def') respect nulls over (order by id desc) as x5,
          sum(id) over (order by id desc ROWS BETWEEN UNBOUNDED PRECEDING AND 
UNBOUNDED FOLLOWING) as sum_id
   from (select 2 id, 'b' a union all select 1 id, null a union all select 3 
id, null union all select 4 id, 'x')
   ```
   triggers this error.
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   The error is triggered at `evaluate_all` method of the 
`WindowShiftEvaluator`. This implementation should be updated to support this 
feature.


-- 
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]

Reply via email to