Class FieldReferenceExpression
- java.lang.Object
-
- org.apache.flink.table.expressions.FieldReferenceExpression
-
- All Implemented Interfaces:
Expression,ResolvedExpression
@PublicEvolving public final class FieldReferenceExpression extends Object implements ResolvedExpression
A reference to a field in an input. The reference contains:- type
- index of an input the field belongs to
- index of a field within the corresponding input
- optional: alias of the input, if it needs to be referenced by name
-
-
Constructor Summary
Constructors Constructor Description FieldReferenceExpression(String name, DataType dataType, int inputIndex, int fieldIndex)FieldReferenceExpression(String name, DataType dataType, int inputIndex, int fieldIndex, String inputAlias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(ExpressionVisitor<R> visitor)StringasSerializableString(SqlFactory sqlFactory)Returns a string that fully serializes this instance.StringasSummaryString()Returns a string that summarizes this expression for printing to a console.booleanequals(Object o)List<Expression>getChildren()intgetFieldIndex()intgetInputIndex()StringgetName()DataTypegetOutputDataType()Returns the data type of the computation result.List<ResolvedExpression>getResolvedChildren()inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.expressions.ResolvedExpression
asSerializableString
-
-
-
-
Method Detail
-
getName
public String getName()
-
getInputIndex
public int getInputIndex()
-
getFieldIndex
public int getFieldIndex()
-
getOutputDataType
public DataType getOutputDataType()
Description copied from interface:ResolvedExpressionReturns the data type of the computation result.- Specified by:
getOutputDataTypein interfaceResolvedExpression
-
getResolvedChildren
public List<ResolvedExpression> getResolvedChildren()
- Specified by:
getResolvedChildrenin interfaceResolvedExpression
-
asSummaryString
public String asSummaryString()
Description copied from interface:ExpressionReturns a string that summarizes this expression for printing to a console. An implementation might skip very specific properties.- Specified by:
asSummaryStringin interfaceExpression- Returns:
- summary string of this expression for debugging purposes
-
asSerializableString
public String asSerializableString(SqlFactory sqlFactory)
Description copied from interface:ResolvedExpressionReturns a string that fully serializes this instance. The serialized string can be used for storing the query in, for example, aCatalogas a view.- Specified by:
asSerializableStringin interfaceResolvedExpression- Returns:
- detailed string for persisting in a catalog
-
getChildren
public List<Expression> getChildren()
- Specified by:
getChildrenin interfaceExpression
-
accept
public <R> R accept(ExpressionVisitor<R> visitor)
- Specified by:
acceptin interfaceExpression
-
-