apache/spark — pull request #446 by chenghao-intel (2014-04-18 06:38:46+00:00)
Title: [Spark-1461] Deferred Expression Evaluation (short-circuit evaluation)

Short-circut will significantly improves the performance in Expression Evaluation, however, we can not fold an deterministic-less UDF (like Rand()), and also the stateful UDF should not be ignored in short-circuit evaluation(e.g. in expression: col1 > 0 and row_sequence() < 1000, row_sequence() can not be ignored.)

I brought an concept of DeferredObject from Hive, which has 2 types of children types (EagerResult / DeferredResult), the former will require trigger the evaluation before it's created, while the later will trigger the evaluation when first call its get() method.