risingwave_expr_impl/udf/
mod.rs1#![allow(dead_code, unused_imports)]
16
17use anyhow::{Context as _, Result};
19use futures_util::stream::BoxStream;
20use risingwave_common::array::arrow::arrow_array_udf::{ArrayRef, BooleanArray, RecordBatch};
21use risingwave_expr::sig::{
22 CreateFunctionOutput, CreateOptions, UDF_IMPLS, UdfImpl, UdfImplDescriptor,
23};
24
25#[cfg(feature = "external-udf")]
26#[cfg(not(madsim))]
27mod external;
28#[cfg(feature = "python-udf")]
29mod python;
30#[cfg(feature = "js-udf")]
31mod quickjs;
32#[cfg(feature = "wasm-udf")]
33mod wasm;
34
35fn read_file_from_link(link: &str) -> Result<Vec<u8>> {
37 let path = link
39 .strip_prefix("fs://")
40 .context("only 'fs://' is supported")?;
41 let content =
42 std::fs::read(path).context("failed to read wasm binary from local file system")?;
43 Ok(content)
44}