Class JdbcRowDataLookupFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.TableFunction<org.apache.flink.table.data.RowData>
-
- org.apache.flink.table.functions.LookupFunction
-
- org.apache.flink.connector.jdbc.table.JdbcRowDataLookupFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.table.functions.FunctionDefinition
@Internal public class JdbcRowDataLookupFunction extends org.apache.flink.table.functions.LookupFunctionA lookup function forJdbcDynamicTableSource.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ConnectiongetDbConnection()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.voidopen(org.apache.flink.table.functions.FunctionContext context)-
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
-
-
-
-
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:
openin classorg.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:
lookupin classorg.apache.flink.table.functions.LookupFunction- Parameters:
keyRow- lookup keys
-
close
public void close() throws IOException- Overrides:
closein classorg.apache.flink.table.functions.UserDefinedFunction- Throws:
IOException
-
getDbConnection
@VisibleForTesting public Connection getDbConnection()
-
-