public class FileSystemLookupFunction<P> extends TableFunction<RowData>
The hive connector and filesystem connector share read/write files code. Currently, this function only used in hive connector.
Constructor and Description |
---|
FileSystemLookupFunction(PartitionFetcher<P> partitionFetcher,
PartitionFetcher.Context<P> fetcherContext,
PartitionReader<P,RowData> partitionReader,
RowType rowType,
int[] lookupKeys,
Duration reloadInterval) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Tear-down method for user-defined function.
|
void |
eval(Object... values) |
PartitionFetcher.Context<P> |
getFetcherContext() |
PartitionFetcher<P> |
getPartitionFetcher() |
PartitionReader<P,RowData> |
getPartitionReader() |
Duration |
getReloadInterval() |
TypeInformation<RowData> |
getResultType()
Returns the result type of the evaluation method.
|
void |
open(FunctionContext context)
Setup method for user-defined function.
|
collect, finish, getKind, getParameterTypes, getTypeInference, setCollector
functionIdentifier, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRequirements, isDeterministic, supportsConstantFolding
public FileSystemLookupFunction(PartitionFetcher<P> partitionFetcher, PartitionFetcher.Context<P> fetcherContext, PartitionReader<P,RowData> partitionReader, RowType rowType, int[] lookupKeys, Duration reloadInterval)
public void open(FunctionContext context) throws Exception
UserDefinedFunction
open
in class UserDefinedFunction
Exception
public TypeInformation<RowData> getResultType()
TableFunction
getResultType
in class TableFunction<RowData>
public void eval(Object... values)
public void close() throws Exception
UserDefinedFunction
close
in class UserDefinedFunction
Exception
@VisibleForTesting public Duration getReloadInterval()
@VisibleForTesting public PartitionFetcher<P> getPartitionFetcher()
@VisibleForTesting public PartitionFetcher.Context<P> getFetcherContext()
@VisibleForTesting public PartitionReader<P,RowData> getPartitionReader()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.