How do I create a UDF in datafusion rust? #2980
Unanswered
chauhanVritul
asked this question in
Q&A
Replies: 1 comment
-
Hi @chauhanVritul ! The return type of this function should be I assume the example you refer to is https://github.com/apache/arrow-datafusion/blob/41b4e491663029f653e491b110d0b5e74d08a0b6/datafusion-examples/examples/simple_udf.rs Would it be possible to paste in what you have tried so far? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to make a UDF similar to array_contains(), since it is not supported by datafusion.
Consider a table like this:
col_1 | col_2
"one" | [ "123", "234", "345"]
"two" | [ "987", "876", "123"]
I only want the columns containing "123". So the SQL query is like:
SELECT * FROM table WHERE array_contain(col_2, "123")
The example provided is good but am unable to give it a valid return type.
Beta Was this translation helpful? Give feedback.
All reactions