feat: add array_min scalar function and associated tests#16574
feat: add array_min scalar function and associated tests#16574alamb merged 6 commits intoapache:mainfrom
array_min scalar function and associated tests#16574Conversation
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| use crate::utils::make_scalar_function; |
There was a problem hiding this comment.
I recommend putting this in the same file as https://github.com/apache/datafusion/blob/main/datafusion/functions-nested/src/max.rs
perhaps call it https://github.com/apache/datafusion/blob/main/datafusion/functions-nested/src/min_max.rs 🤔
You may be able to share some code, but more importantly I think it will be clearer that min and max are basically the same function
There was a problem hiding this comment.
Sure, should be quick. Let me move refac
"specialized implementation" sounds interesting, can you please ellaborate more i can try working on it on a sperate issue ? |
… better code reuse
Well the first thing would be to make a benchmark calling array_min for different types of ListArrays (like LIst and List) with different length list elements The profile with these instructions https://datafusion.apache.org/library-user-guide/profiling.html#profile-the-benchmark My guess (needs to be verified by profiling):
|
|
Thanks for the details @alamb I will try this out and share my findings |
|
Thanks again @dharanad |
Which issue does this PR close?
array_minscalar function #16570Rationale for this change
What changes are included in this PR?
Implemented ArrayMin Scalar function
Are these changes tested?
Yes, Add logic tests as well
Are there any user-facing changes?