Class 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 a Model in 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.

    • 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
      • 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:
        getOutputDataType in interface org.apache.flink.table.expressions.ResolvedExpression
      • getResolvedChildren

        public List<org.apache.flink.table.expressions.ResolvedExpression> getResolvedChildren()
        Specified by:
        getResolvedChildren in interface org.apache.flink.table.expressions.ResolvedExpression
      • asSerializableString

        public String asSerializableString​(org.apache.flink.table.expressions.SqlFactory sqlFactory)
        Specified by:
        asSerializableString in interface org.apache.flink.table.expressions.ResolvedExpression
      • asSummaryString

        public String asSummaryString()
        Specified by:
        asSummaryString in interface org.apache.flink.table.expressions.Expression
      • getChildren

        public List<org.apache.flink.table.expressions.Expression> getChildren()
        Specified by:
        getChildren in interface org.apache.flink.table.expressions.Expression
      • accept

        public <R> R accept​(org.apache.flink.table.expressions.ExpressionVisitor<R> visitor)
        Specified by:
        accept in interface org.apache.flink.table.expressions.Expression
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object