Does RisingWave (RW) support streaming data from materialized views to UDFs?
I'm trying to stream rows from a materialized view to a UDF and persist the returned data to a read-write (RW) table. However, I encounter errors when inserting records from my materialized view, indicating that my function is not implemented. My query looks like this:
SELECT
my_udf_function(
id,
value_x,
value_y
)
FROM
mv_table;
The error message is:
Caused by:
Feature is not yet implemented: unsupported function: "my_udf_function"
But my function is available as shown in the function list. I'm wondering if RW supports this functionality and how to resolve the error.
Dominic Lindsay
Asked on Sep 12, 2023
It seems like there might be a type mismatch or a bug with numeric data types in UDFs in RisingWave. As a workaround, you can try using REAL/DOUBLE/VARCHAR types instead of DECIMAL/Numeric types. If precision is crucial, you can convert numeric values to VARCHAR before calling the UDF and then construct a decimal from a string in Python. This way, you can avoid precision loss until the bug is fixed in a future release.