Expression

A set of classes that can be used to represent trees of relational expressions. A key goal of the expression library is to hide the details of naming and scoping from developers who want to manipulate trees of relational operators. As such, the library defines a special type of expression, a NamedExpression in addition to the standard collection of expressions.

Essentially, an Expression can be used to evaluate an InternalRow and return an arbitrary java object. For example, the deserializerFor of ExpressionEncoder used in DataSet, the deserializer is an Expression converting an row to an java object. The deserializer may include the information on how to construct a java class from a row.

genCode is the entry point for run-time code generation, and subclass should implement doGenCode to provide implementation.

If the expression does not provide doGenCode, it needs to be the subclass of the trait CodegenFallback for fallback code generation, which actually relies on eval to perform the work.

results matching ""

    No results matching ""