Scala ASTs for evaluating an Expression given a Row of input.
Scala ASTs for evaluating an Expression given a Row of input.
The sequence of statements required to evaluate the expression.
A term that holds a boolean value representing whether the expression evaluated to null.
A term for a possible primitive value of the result of the evaluation. Not
valid if nullTerm
is set to true
.
A possibly boxed version of the result of evaluating this expression.
Binds an input expression to a given input schema
Binds an input expression to a given input schema
Canonicalizes an input expression.
Canonicalizes an input expression. Used to avoid double caching expressions that differ only cosmetically.
Generates a class for a given input expression.
Generates a class for a given input expression. Called when there is not cached code already available.
Generates the requested evaluator given already bound expression(s).
Generates the requested evaluator binding the given expression(s) to the inputSchema.
A cache of generated classes.
A cache of generated classes.
From the Guava Docs: A Cache is similar to ConcurrentMap, but not quite the same. The most fundamental difference is that a ConcurrentMap persists all elements that are added to it until they are explicitly removed. A Cache on the other hand is generally configured to evict entries automatically, in order to constrain its memory footprint. Note that this cache does not use weak keys/values and thus does not respond to memory pressure.
Can be flipped on manually in the console to add (expensive) expression evaluation trace code.
Given an expression tree returns an EvaluatedExpression, which contains Scala trees that can be used to determine the result of evaluating the expression on an input row.
Returns a term name that is unique within this instance of a CodeGenerator
.
Returns a term name that is unique within this instance of a CodeGenerator
.
(Since we aren't in a macro context we do not seem to have access to the built in freshName
function.)
A base class for generators of byte code to perform expression evaluation. Includes a set of helpers for referring to Catalyst types and building trees that perform evaluation of individual expressions.