Class JdbcRowDataLookupFunction

  • All Implemented Interfaces:
    Serializable, org.apache.flink.table.functions.FunctionDefinition

    @Internal
    public class JdbcRowDataLookupFunction
    extends org.apache.flink.table.functions.LookupFunction
    A lookup function for JdbcDynamicTableSource.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      Connection getDbConnection()  
      Collection<org.apache.flink.table.data.RowData> lookup​(org.apache.flink.table.data.RowData keyRow)
      This is a lookup method which is called by Flink framework in runtime.
      void open​(org.apache.flink.table.functions.FunctionContext context)  
      • Methods inherited from class org.apache.flink.table.functions.LookupFunction

        eval
      • Methods inherited from class org.apache.flink.table.functions.TableFunction

        collect, finish, getKind, getParameterTypes, getResultType, getTypeInference, setCollector
      • Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction

        functionIdentifier, toString
      • Methods inherited from interface org.apache.flink.table.functions.FunctionDefinition

        getRequirements, isDeterministic
    • Constructor Detail

      • JdbcRowDataLookupFunction

        public JdbcRowDataLookupFunction​(InternalJdbcConnectionOptions options,
                                         int maxRetryTimes,
                                         String[] fieldNames,
                                         org.apache.flink.table.types.DataType[] fieldTypes,
                                         String[] keyNames,
                                         org.apache.flink.table.types.logical.RowType rowType)
    • Method Detail

      • open

        public void open​(org.apache.flink.table.functions.FunctionContext context)
                  throws Exception
        Overrides:
        open in class org.apache.flink.table.functions.UserDefinedFunction
        Throws:
        Exception
      • lookup

        public Collection<org.apache.flink.table.data.RowData> lookup​(org.apache.flink.table.data.RowData keyRow)
        This is a lookup method which is called by Flink framework in runtime.
        Specified by:
        lookup in class org.apache.flink.table.functions.LookupFunction
        Parameters:
        keyRow - lookup keys
      • close

        public void close()
                   throws IOException
        Overrides:
        close in class org.apache.flink.table.functions.UserDefinedFunction
        Throws:
        IOException
      • getDbConnection

        @VisibleForTesting
        public Connection getDbConnection()