v.23.5Improvement
Extend first_value and last_value to Accept NULL
Why it matters
Previously, thefirst_value and last_value window functions did not handle NULL input values, limiting their usability in scenarios where NULLs are present. This enhancement allows these functions to process and return NULLs correctly, improving accuracy and flexibility when working with datasets containing NULL entries.How to use it
Users can now directly usefirst_value and last_value in their SQL queries as before. These functions will properly handle NULL values without additional configuration or changes in syntax. For example:SELECT first_value(column_name) OVER (PARTITION BY col ORDER BY col2) FROM tablewill now correctly consider NULLs within the window frame.