Class ScalarFn
java.lang.Object
org.apache.beam.sdk.extensions.sql.udf.ScalarFn
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
UdfTestProvider.DateIncrementAllFn
,UdfTestProvider.HelloWorldFn
,UdfTestProvider.IncrementFn
,UdfTestProvider.IsNullFn
,UdfTestProvider.MatchFn
,UdfTestProvider.UnusedFn
A scalar function that can be executed as part of a SQL query. Subclasses must contain exactly
one method annotated with
ScalarFn.ApplyMethod
, which will be applied to the SQL function
arguments at runtime.
For example:
public class IncrementFn extends ScalarFn {
@ApplyMethod
public Long increment(Long i) {
return i + 1;
}
}
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interface
Annotates the single method in aScalarFn
implementation that is to be applied to SQL function arguments. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ScalarFn
public ScalarFn()
-