Interface Member

public interface Member
A named expression in a schema.

Examples of members

Several kinds of members crop up in real life. They all implement the Member interface, but tend to be treated differently by the back-end system if not by Calcite.

A member that has zero arguments and a type that is a collection of records is referred to as a relation. In schemas backed by a relational database, tables and views will appear as relations.

A member that has one or more arguments and a type that is a collection of records is referred to as a parameterized relation. Some relational databases support these; for example, Oracle calls them "table functions".

Members may be also more typical of programming-language functions: they take zero or more arguments, and return a result of arbitrary type.

From the above definitions, you can see that a member is a special kind of function. This makes sense, because even though it has no arguments, it is "evaluated" each time it is used in a query.

  • Method Details

    • getName

      String getName()
      The name of this function.
    • getParameters

      List<FunctionParameter> getParameters()
      Returns the parameters of this member.
      Parameters; never null
    • getType

      RelDataType getType()
      Returns the type of this function's result.
      Type of result; never null
    • evaluate

      Queryable evaluate(Object schemaInstance, List<Object> arguments)
      Evaluates this member to yield a result. The result is a Queryable.
      schemaInstance - Object that is an instance of the containing Schema
      arguments - List of arguments to the call; must match parameters in number and type
      An instance of this schema object, as a Queryable