jcsherin commented on issue #11433:
URL: https://github.com/apache/datafusion/issues/11433#issuecomment-2225971515

   For `nth_value` aggregation there are 3 possible states:
   1. The nth row exists and the value is returned.
   2. The nth row is out of range and NULL is returned.
   3. No rows qualified for aggregation and NULL is returned.
   
   2 & 3 is covered by the else branch in `Accumulator::evaluate`. The result 
does not depend on `nullable` of list in the accumulator state.
   
https://github.com/apache/datafusion/blob/1dfac86a89750193491cf3e04917e37b92c64ffa/datafusion/functions-aggregate/src/nth_value.rs#L337-L342
   
   The `nullable`(Line 141) for the list is rendered no-op. 
https://github.com/apache/datafusion/blob/1dfac86a89750193491cf3e04917e37b92c64ffa/datafusion/functions-aggregate/src/nth_value.rs#L134-L142
   
   This possibly explains passing tests. Thoughts?


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to