Packages

case class CatalystExpressionBuilder(function: AnyRef) extends Logging with Product with Serializable

CatalystExpressionBuilder

This compiles a scala lambda expression into a catalyst expression.

Here are the high-level steps:

1) Use SerializedLambda and javaassist to get a reflection based interface to function this is done in LambdaReflection

2) Obtain the Control Flow Graph (CFG) using the reflection interface obtained above.

3) Get catalyst Expressions based on the basic blocks BB obtained in the CFG and simplify before replacing in the Spark Logical Plan.

function

the original Scala UDF provided by the user

Linear Supertypes
Serializable, Serializable, Product, Equals, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CatalystExpressionBuilder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Logging
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CatalystExpressionBuilder(function: AnyRef)

    function

    the original Scala UDF provided by the user

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. def compile(children: Seq[Expression], objref: Option[Expression] = None): Option[Expression]

    compile: Entry point for CatalystExpressionBuilder.

    compile: Entry point for CatalystExpressionBuilder.

    With this function we:

    1) Create a starting State, which ultimately is used to keep track of the locals, stack, condition, expression.

    2) Pick out the head Basic Block (BB) from the Control Flow Graph (CFG) NOTE: that this picks the head element, and then recurses

    3) Feed head BB to the start node

    children

    a sequence of catalyst arguments to the udf.

    returns

    the compiled expression, optionally

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  10. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  13. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  14. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  15. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  16. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  17. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  18. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  19. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  20. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  21. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  22. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  23. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  24. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped