Generalize existing SQL UDF functions to all types#18587
Generalize existing SQL UDF functions to all types#18587kaikalur merged 1 commit intoprestodb:masterfrom
Conversation
There was a problem hiding this comment.
A trick with find_first was needed here because we can't do cast(NULL as T) in the function body
4945cd2 to
3863093
Compare
kaikalur
left a comment
There was a problem hiding this comment.
This is great! Can you add a couple of test to show a) any new types that would work now and b) any that would not (like rows with nulls or something that can't be compared) for all the functions that you fixed? I see for some but also add the error cases say something like: ARRAY[ROW(1, null), ROW(null, 2)] etc.
3863093 to
5630c9c
Compare
Added some more unit tests |
5630c9c to
7c2a16e
Compare
Following #18581, this extends the following SQL invoked functions to accept any type as input, not just varchar and double:
array_frequency, array_duplicates, array_has_duplicates, array_intersectTest plan -
mvn test -Dtest=TestArrayIntersectFunction,TestArraySqlFunctions test