public interface BeamSqlUdf
extends java.io.Serializable
A static method eval is required. Here is an example:
public static class MyLeftFunction {
public String eval(
@Parameter(name = "s") String s,
@Parameter(name = "n", optional = true) Integer n) {
return s.substring(0, n == null ? 1 : n);
}
}
The first parameter is named "s" and is mandatory, and the second parameter is named "n" and is optional(always NULL if not specified).
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
UDF_METHOD |
static final java.lang.String UDF_METHOD