[built-in function] add `greatest(T,...)` and `least(T,...)` SQL functions
Which issue does this PR close?
- Closes #6531
Rationale for this change
add greatest(T,..) and least(T,..) variadic functions as per SQL 2023.
What changes are included in this PR?
- add
greatest(T,..)andleast(T,..)variadic functions as per SQL 2023.- when no args are supplied the functions err
- when both scalar and arrays are supplied then scalars are converted to arrays before max/min
- only boolean, string, and numeric types are supported for now, no dates, etc.
- arrow
zipandordkernels are used
- change variadic equal function signature to take a vec of allowed types, only types within that types can be used
Are these changes tested?
- unit tests
- integration tests using tokio and based on sql
Are there any user-facing changes?
Marking as draft as this PR has feedback and is awaiting a response (I am trying to keep the list of PRs needing review clear) -- please mark as ready for review when ready
Welcome back 👋 @Jimexist ! It is great to see you again and thank you for your contribution.
I am sorry I wrote a comment about using
MinandMaxaccumulators previously but I forgot to click submit.cc @izveigor as I think you have been working to add additional support for array computations
thank you @alamb my bandwidth recently is very limited, so I am going to pause this PR for a bit, if anyone wants to take over feel free to. I can also do a merge as is (after rebase fix) and create issues as follow ups?
thank you @alamb my bandwidth recently is very limited, so I am going to pause this PR for a bit, if anyone wants to take over feel free to. I can also do a merge as is (after rebase fix) and create issues as follow ups?
Whatever you prefer -- I defer to your judgement
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.