Class InternalRowMergerFunction

java.lang.Object
org.apache.flink.table.functions.UserDefinedFunction
org.apache.flink.table.functions.ScalarFunction
org.apache.flink.table.examples.java.functions.InternalRowMergerFunction
All Implemented Interfaces:
Serializable, org.apache.flink.table.functions.FunctionDefinition

public final class InternalRowMergerFunction extends org.apache.flink.table.functions.ScalarFunction
Merges two rows into a single row with unique field names.

The function uses a custom TypeInference and thus disables any of the default reflection-based logic. It returns internal data structures for both input and output types of the eval method.

For code readability, we might use some internal utility methods that should rarely change. Implementers can copy those if they don't want to rely on non-official API.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.table.data.RowData
    eval(org.apache.flink.table.data.RowData r1, org.apache.flink.table.data.RowData r2)
     
    org.apache.flink.table.types.inference.TypeInference
    getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)
     

    Methods inherited from class org.apache.flink.table.functions.ScalarFunction

    getKind, getParameterTypes, getResultType

    Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction

    close, functionIdentifier, open, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.flink.table.functions.FunctionDefinition

    getRequirements, isDeterministic, supportsConstantFolding
  • Constructor Details

    • InternalRowMergerFunction

      public InternalRowMergerFunction()
  • Method Details

    • getTypeInference

      public org.apache.flink.table.types.inference.TypeInference getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)
      Specified by:
      getTypeInference in interface org.apache.flink.table.functions.FunctionDefinition
      Overrides:
      getTypeInference in class org.apache.flink.table.functions.ScalarFunction
    • eval

      public org.apache.flink.table.data.RowData eval(org.apache.flink.table.data.RowData r1, org.apache.flink.table.data.RowData r2)