Class AdvancedFunctionsExample

java.lang.Object
org.apache.flink.table.examples.java.functions.AdvancedFunctionsExample

public class AdvancedFunctionsExample extends Object
Example for implementing more complex UserDefinedFunctions.

In many use cases, function signatures can be reflectively extracted from a UDF class. The annotations DataTypeHint and FunctionHint help if reflective information is not enough and needs to be enriched with further logical details. Check the website documentation as well as the docs of ScalarFunction, TableFunction, and AggregateFunction for more information.

Both reflective extraction and annotations are suitable for function signatures with fixed input and output types. However, for advanced use cases it might be required to derive an output type from one of the argument types or perform stricter validation.

This example demonstrates various UDF implementations. We are executing multiple Flink jobs where the result is written to stdout.

  • Constructor Details

    • AdvancedFunctionsExample

      public AdvancedFunctionsExample()
  • Method Details