Skip to content

Commit

Permalink
link all the expression names.
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Jan 8, 2014
1 parent 83227e4 commit 7eff191
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/scala/catalyst/expressions/Expression.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ abstract class Expression extends TreeNode[Expression] {
* Returns true when an expression is a candidate for static evaluation before the query is
* executed.
* The following conditions are used to determine suitability for constant folding:
* - A Coalesce is foldable if all of its children are foldable
* - A BinaryExpression is foldable if its both left and right child are foldable.
* - A Not, isNull, or isNotNull is foldable if its child is foldable.
* - A Literal is foldable.
* - A Cast or UnaryMinus is foldable if its child is foldable.
* - A [[expressions.Coalesce Coalesce]] is foldable if all of its children are foldable
* - A [[expressions.BinaryExpression BinaryExpression]] is foldable if its both left and right
* child are foldable
* - A [[expressions.Not Not]], [[expressions.IsNull IsNull]], or [[expressions.IsNotNull IsNotNull]]
* is foldable if its child is foldable.
* - A [[expressions.Literal]] is foldable.
* - A [[expressions.Cast Cast]] or [[expressions.UnaryMinus UnaryMinus]] is foldable if its
* child is foldable.
*/
// TODO: Supporting more foldable expressions. For example, deterministic Hive UDFs.
def foldable: Boolean = false
Expand Down

0 comments on commit 7eff191

Please sign in to comment.