Class CompilerHints
- java.lang.Object
-
- org.apache.flink.api.common.operators.CompilerHints
-
@Internal public class CompilerHints extends Object
A class encapsulating compiler hints describing the behavior of the user function. If set, the optimizer will use them to estimate the sizes of the intermediate results. Note that these values are optional hints, the optimizer will always generate a valid plan without them as well. The hints may help, however, to improve the plan choice.
-
-
Constructor Summary
Constructors Constructor Description CompilerHints()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUniqueField(int field)
Adds a field as having only unique values.void
addUniqueField(FieldSet uniqueFieldSet)
Adds a FieldSet to be uniquevoid
addUniqueFields(Set<FieldSet> uniqueFieldSets)
Adds multiple FieldSets to be uniquevoid
clearUniqueFields()
protected void
copyFrom(CompilerHints source)
float
getAvgOutputRecordSize()
float
getFilterFactor()
long
getOutputCardinality()
long
getOutputSize()
Set<FieldSet>
getUniqueFields()
Gets the FieldSets that are uniquevoid
setAvgOutputRecordSize(float avgOutputRecordSize)
void
setFilterFactor(float filterFactor)
void
setOutputCardinality(long outputCardinality)
void
setOutputSize(long outputSize)
-
-
-
Method Detail
-
getOutputSize
public long getOutputSize()
-
setOutputSize
public void setOutputSize(long outputSize)
-
getOutputCardinality
public long getOutputCardinality()
-
setOutputCardinality
public void setOutputCardinality(long outputCardinality)
-
getAvgOutputRecordSize
public float getAvgOutputRecordSize()
-
setAvgOutputRecordSize
public void setAvgOutputRecordSize(float avgOutputRecordSize)
-
getFilterFactor
public float getFilterFactor()
-
setFilterFactor
public void setFilterFactor(float filterFactor)
-
getUniqueFields
public Set<FieldSet> getUniqueFields()
Gets the FieldSets that are unique- Returns:
- List of FieldSet that are unique
-
addUniqueField
public void addUniqueField(FieldSet uniqueFieldSet)
Adds a FieldSet to be unique- Parameters:
uniqueFieldSet
- The unique FieldSet
-
addUniqueField
public void addUniqueField(int field)
Adds a field as having only unique values.- Parameters:
field
- The field with unique values.
-
addUniqueFields
public void addUniqueFields(Set<FieldSet> uniqueFieldSets)
Adds multiple FieldSets to be unique- Parameters:
uniqueFieldSets
- A set of unique FieldSet
-
clearUniqueFields
public void clearUniqueFields()
-
copyFrom
protected void copyFrom(CompilerHints source)
-
-