Class ModelReferenceExpression
- java.lang.Object
-
- org.apache.flink.table.expressions.ModelReferenceExpression
-
- All Implemented Interfaces:
org.apache.flink.table.expressions.Expression,org.apache.flink.table.expressions.ResolvedExpression
@Internal public final class ModelReferenceExpression extends Object implements org.apache.flink.table.expressions.ResolvedExpression
A reference to aModelin an expression context.This expression is used when a model needs to be passed as an argument to functions or operations that accept model references. It wraps a model object and provides the necessary expression interface for use in the Table API expression system.
The expression carries a string representation of the model and uses a special data type to indicate that this is a model reference rather than a regular data value.
-
-
Constructor Summary
Constructors Constructor Description ModelReferenceExpression(String name, ContextResolvedModel model, TableEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(org.apache.flink.table.expressions.ExpressionVisitor<R> visitor)StringasSerializableString(org.apache.flink.table.expressions.SqlFactory sqlFactory)StringasSummaryString()booleanequals(Object o)List<org.apache.flink.table.expressions.Expression>getChildren()org.apache.flink.table.types.DataTypegetInputDataType()Returns the input data type expected by this model reference.ContextResolvedModelgetModel()Returns the ContextResolvedModel associated with this model reference.StringgetName()Returns the name of this model reference.org.apache.flink.table.types.DataTypegetOutputDataType()List<org.apache.flink.table.expressions.ResolvedExpression>getResolvedChildren()TableEnvironmentgetTableEnvironment()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
ModelReferenceExpression
public ModelReferenceExpression(String name, ContextResolvedModel model, TableEnvironment env)
-
-
Method Detail
-
getName
public String getName()
Returns the name of this model reference.- Returns:
- the model reference name
-
getModel
public ContextResolvedModel getModel()
Returns the ContextResolvedModel associated with this model reference.- Returns:
- the query context resolved model
-
getTableEnvironment
@Nullable public TableEnvironment getTableEnvironment()
-
getInputDataType
public org.apache.flink.table.types.DataType getInputDataType()
Returns the input data type expected by this model reference.This method extracts the input data type from the model's input schema, which describes the structure and data types that the model expects for inference operations.
- Returns:
- the input data type expected by the model
-
getOutputDataType
public org.apache.flink.table.types.DataType getOutputDataType()
- Specified by:
getOutputDataTypein interfaceorg.apache.flink.table.expressions.ResolvedExpression
-
getResolvedChildren
public List<org.apache.flink.table.expressions.ResolvedExpression> getResolvedChildren()
- Specified by:
getResolvedChildrenin interfaceorg.apache.flink.table.expressions.ResolvedExpression
-
asSerializableString
public String asSerializableString(org.apache.flink.table.expressions.SqlFactory sqlFactory)
- Specified by:
asSerializableStringin interfaceorg.apache.flink.table.expressions.ResolvedExpression
-
asSummaryString
public String asSummaryString()
- Specified by:
asSummaryStringin interfaceorg.apache.flink.table.expressions.Expression
-
getChildren
public List<org.apache.flink.table.expressions.Expression> getChildren()
- Specified by:
getChildrenin interfaceorg.apache.flink.table.expressions.Expression
-
accept
public <R> R accept(org.apache.flink.table.expressions.ExpressionVisitor<R> visitor)
- Specified by:
acceptin interfaceorg.apache.flink.table.expressions.Expression
-
-