v.21.1Improvements
When using -OrNull with other combinators, prioritize -OrNull placement
When-OrNullcombinator combined-If,-Merge,-MergeState,-Statecombinators, we should put-OrNullin front. #16935 (flynn).
Why it matters
To ensure consistent and predictable behavior of aggregate functions by requiring that the-OrNull combinator is always placed before other combinators like -If, -Merge, -MergeState, and -State. This prevents unexpected results and simplifies the aggregation logic for users.How to use it
When combining aggregate function combinators, always place-OrNull at the beginning of the combinator chain before others like -If, -Merge, -MergeState, or -State. For example, use aggFunctionOrNullIf instead of aggFunctionIfOrNull.