case classDynamicFoldableExpression(expr: Expression) extends Expression with DynamicReplacableConstant with Product with Serializable
Wrap any ParamLiteral expression with this so that we can generate literal initialization code
within the .init() method of the generated class.
We try to locate first foldable expression in a query tree such that all its child is foldable
but parent isn't. That way we locate the exact point where an expression is safe to evalute
once instead of evaluating every row.
Expressions like select c from tab where
case col2 when 1 then col3 else 'y' end = 22
like queries doesn't converts literal evaluation into init method.
expr
minimal expression tree that can be evaluated only once and turn into a constant.
Linear Supertypes
Serializable, Serializable, DynamicReplacableConstant, Expression, TreeNode[Expression], Product, Equals, AnyRef, Any
Ordering
Alphabetic
By Inheritance
Inherited
DynamicFoldableExpression
Serializable
Serializable
DynamicReplacableConstant
Expression
TreeNode
Product
Equals
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Instance Constructors
newDynamicFoldableExpression(expr: Expression)
expr
minimal expression tree that can be evaluated only once and turn into a constant.
Wrap any ParamLiteral expression with this so that we can generate literal initialization code within the
.init()
method of the generated class.We try to locate first foldable expression in a query tree such that all its child is foldable but parent isn't. That way we locate the exact point where an expression is safe to evalute once instead of evaluating every row.
Expressions like
select c from tab where case col2 when 1 then col3 else 'y' end = 22
like queries doesn't converts literal evaluation into init method.minimal expression tree that can be evaluated only once and turn into a constant.