marc-pydantic opened a new issue, #18300:
URL: https://github.com/apache/datafusion/issues/18300

   When the `FIRST_VALUE` or `LAST_VALUE` SQL function implementation's 
`merge_batch` functions are called, the second column (`is_set`) is used for 
filtering but it is not checked for `NULL` values. The current implementation 
(although this seems to be largely undocumented) assumes `false` for every NULL 
value.
   
   Admittedly this should never happen during normal operation, but while 
breaking other things, I have encountered this masking a data corruption bug at 
least once.
   
   I'm proposing a check for NULLnes on these columns, as it is relatively 
cheap and help catch internal errors earlier.


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

Reply via email to