@Internal public final class ConstantFunctionContext extends FunctionContext
FunctionContext
for constant expression reduction. It is used when a function is called
with constant expressions or constant expressions can be derived from the given statement.
Since constant expression reduction happens during planning, methods that reference Flink's runtime context are not available.
FunctionDefinition.isDeterministic()
Constructor and Description |
---|
ConstantFunctionContext(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
File |
getCachedFile(String name)
Gets the local temporary file copy of a distributed cache files.
|
Set<ExternalResourceInfo> |
getExternalResourceInfos(String resourceName)
Get the external resource information.
|
String |
getJobParameter(String key,
String defaultValue)
Gets the global job parameter value associated with the given key as a string.
|
MetricGroup |
getMetricGroup()
Returns the metric group for this parallel subtask.
|
public ConstantFunctionContext(Configuration configuration)
public MetricGroup getMetricGroup()
FunctionContext
getMetricGroup
in class FunctionContext
public File getCachedFile(String name)
FunctionContext
getCachedFile
in class FunctionContext
name
- distributed cache file namepublic String getJobParameter(String key, String defaultValue)
FunctionContext
getJobParameter
in class FunctionContext
key
- key pointing to the associated valuedefaultValue
- default value which is returned in case global job parameter is null or
there is no value associated with the given keypublic Set<ExternalResourceInfo> getExternalResourceInfos(String resourceName)
FunctionContext
getExternalResourceInfos
in class FunctionContext
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.