org.apache.spark.sql.catalyst.expressions.codegen

CodeGenContext

class CodeGenContext extends AnyRef

A context for codegen, which is used to bookkeeping the expressions those are not supported by codegen, then they are evaluated directly. The unsupported expression is appended at the end of references, the position of it is kept in the code, used to access and evaluate it.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CodeGenContext
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CodeGenContext()

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final val JAVA_BOOLEAN: String("boolean")

  7. final val JAVA_BYTE: String("byte")

  8. final val JAVA_DOUBLE: String("double")

  9. final val JAVA_FLOAT: String("float")

  10. final val JAVA_INT: String("int")

  11. final val JAVA_LONG: String("long")

  12. final val JAVA_SHORT: String("short")

  13. def addMutableState(javaType: String, variableName: String, initCode: String): Unit

  14. def addNewFunction(funcName: String, funcCode: String): Unit

  15. val addedFuntions: Map[String, String]

    Holding all the functions those will be added into generated class.

  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def boxedType(dt: DataType): String

  18. def boxedType(jt: String): String

    Returns the boxed type in Java.

  19. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def defaultValue(dt: DataType): String

  21. def defaultValue(jt: String): String

    Returns the representation of default value for a given Java Type.

  22. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def freshName(prefix: String): String

    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.)

  26. def genComp(dataType: DataType, c1: String, c2: String): String

    Generates code for comparing two expressions.

    Generates code for comparing two expressions.

    dataType

    data type of the expressions

    c1

    name of the variable of expression 1's output

    c2

    name of the variable of expression 2's output

  27. def genEqual(dataType: DataType, c1: String, c2: String): String

    Generates code for equal expression in Java.

  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. def getValue(getter: String, dataType: DataType, ordinal: String): String

    Returns the code to access a value in SpecializedGetters for a given DataType.

  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  32. def isPrimitiveType(dt: DataType): Boolean

  33. def isPrimitiveType(jt: String): Boolean

    Returns true if the Java type has a special accessor and setter in InternalRow.

  34. def javaType(dt: DataType): String

    Returns the Java type for a DataType.

  35. val mutableStates: ArrayBuffer[(String, String, String)]

    Holding expressions' mutable states like MonotonicallyIncreasingID.count as a 3-tuple: java type, variable name, code to init it.

    Holding expressions' mutable states like MonotonicallyIncreasingID.count as a 3-tuple: java type, variable name, code to init it. As an example, ("int", "count", "count = 0;") will produce code:

    private int count;

    as a member variable, and add

    count = 0;

    to the constructor.

    They will be kept as member variables in generated classes like SpecificProjection.

  36. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  37. final def notify(): Unit

    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  39. def primitiveTypeName(dt: DataType): String

  40. def primitiveTypeName(jt: String): String

    Returns the name used in accessor and setter for a Java primitive type.

  41. val primitiveTypes: Seq[String]

    List of java data types that have special accessors and setters in InternalRow.

  42. val references: ArrayBuffer[Expression]

    Holding all the expressions those do not support codegen, will be evaluated directly.

  43. def setColumn(row: String, dataType: DataType, ordinal: Int, value: String): String

    Returns the code to update a column in Row for a given DataType.

  44. def splitExpressions(row: String, expressions: Seq[String]): String

    Splits the generated code of expressions into multiple functions, because function has 64kb code size limit in JVM

    Splits the generated code of expressions into multiple functions, because function has 64kb code size limit in JVM

    row

    the variable name of row that is used by expressions

  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def toString(): String

    Definition Classes
    AnyRef → Any
  47. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped