datafusion
datafusion copied to clipboard
Introduce `reverse_expr` for UDAF
Which issue does this PR close?
Closes #. Part of #10091
Rationale for this change
reverse_expr has a different meaning between returning clone and None. Together with reversing, there are three cases.
I think the proposed Enum makes the user understand what they can do in reverse_expr.
What changes are included in this PR?
Are these changes tested?
I added a simple UDAF for testing. I want to avoid adding too many other things just for test only because most of them can be covered after moving UDAF from built-in.
Are there any user-facing changes?
Thanks @jayzhan211 -- I'll check this out tomorrow morning