Currently cnosdb cannot support user-defined functions. In some non-universal scenarios, relying solely on built-in functions may not be able to meet user requirements. There requirements to be a way to support user-defined functions.
Is it possible to support rust udf or python udf, I'm sure rust udf is no problem as this is already supported in https://github.com/scylladb/scylla-rust-udf, but I'm not sure how to use python udf.
- rust udf
- python udf
For python udf, can you refer to https://github.com/apache/arrow-datafusion-python but I am not sure if it is of any reference because it operates differently from us.
If we use wasmtime, can we support rust, c/c++, python, go...?
The syntax looks like this
CREATE FUNCTION concat_str(String, String) RETURNS String
AS '/PATH/to/funcs.wat' LANGUAGE 'wasm';