object CodeGenerator extends Logging
- Alphabetic
- By Inheritance
- CodeGenerator
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val DEFAULT_JVM_HUGE_METHOD_LIMIT: Int(8000)
- final val GENERATED_CLASS_SIZE_THRESHOLD: Int(1000000)
-
final
val
JAVA_BOOLEAN: String("boolean")
Name of Java primitive data type
- final val JAVA_BYTE: String("byte")
- final val JAVA_DOUBLE: String("double")
- final val JAVA_FLOAT: String("float")
- final val JAVA_INT: String("int")
- final val JAVA_LONG: String("long")
- final val JAVA_SHORT: String("short")
- final val MAX_JVM_CONSTANT_POOL_SIZE: Int(65535)
- final val MAX_JVM_METHOD_PARAMS_LENGTH: Int(255)
- final val MERGE_SPLIT_METHODS_THRESHOLD: Int(3)
- final val MUTABLESTATEARRAY_SIZE_LIMIT: Int(32768)
- final val OUTER_CLASS_VARIABLES_THRESHOLD: Int(10000)
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def boxedType(dt: DataType): String
-
def
boxedType(jt: String): String
Returns the boxed type in Java.
-
def
calculateParamLength(params: Seq[Expression]): Int
Returns the length of parameters for a Java method descriptor.
Returns the length of parameters for a Java method descriptor.
thiscontributes one unit and a parameter of type long or double contributes two units. Besides, for nullable parameter, we also need to pass a boolean parameter for the null status. - def calculateParamLengthFromExprValues(params: Seq[ExprValue]): Int
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
compile(code: CodeAndComment): (GeneratedClass, ByteCodeStats)
Compile the Java source code into a Java class, using Janino.
Compile the Java source code into a Java class, using Janino.
- returns
a pair of a generated class and the bytecode statistics of generated functions.
-
def
createArrayAssignment(dstArray: String, elementType: DataType, srcArray: String, dstArrayIndex: String, srcArrayIndex: String, needNullCheck: Boolean): String
Generates assignment code for an ArrayData
Generates assignment code for an ArrayData
- dstArray
name of the array to be assigned
- elementType
data type of the elements in destination and source arrays
- srcArray
name of the array to be read
- dstArrayIndex
an index variable to access each element of destination array
- srcArrayIndex
an index variable to access each element of source array
- needNullCheck
value which shows whether a nullcheck is required for the returning assignment
- returns
code representing an assignment to each element of the ArrayData, which requires a pair of destination and source loop index variables
-
def
createArrayData(arrayName: String, elementType: DataType, numElements: String, additionalErrorMessage: String): String
Generates code creating a UnsafeArrayData or GenericArrayData based on given parameters.
Generates code creating a UnsafeArrayData or GenericArrayData based on given parameters.
- arrayName
name of the array to create
- elementType
data type of the elements in source array
- numElements
code representing the number of elements the array should contain
- additionalErrorMessage
string to include in the error message
- returns
code representing the allocation of ArrayData
- def defaultValue(dt: DataType, typedNull: Boolean = false): String
-
def
defaultValue(jt: String, typedNull: Boolean): String
Returns the representation of default value for a given Java Type.
Returns the representation of default value for a given Java Type.
- jt
the string name of the Java type
- typedNull
if true, for null literals, return a typed (with a cast) version
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getLocalInputVariableValues(ctx: CodegenContext, expr: Expression, subExprs: Map[Expression, SubExprEliminationState] = Map.empty): Set[VariableValue]
Extracts all the input variables from references and subexpression elimination states for a given
expr.Extracts all the input variables from references and subexpression elimination states for a given
expr. This result will be used to split the generated code of expressions into multiple functions. -
def
getValue(input: String, dataType: DataType, ordinal: String): String
Returns the specialized code to access a value from
inputRowatordinal. -
def
getValueFromVector(vector: String, dataType: DataType, rowId: String): String
Returns the specialized code to access a value from a column vector for a given
DataType. -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrimitiveType(dt: DataType): Boolean
-
def
isPrimitiveType(jt: String): Boolean
Returns true if a Java type is Java primitive primitive type
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isValidParamLength(paramLength: Int): Boolean
In Java, a method descriptor is valid only if it represents method parameters with a total length less than a pre-defined constant.
- def javaClass(dt: DataType): Class[_]
-
def
javaType(dt: DataType): String
Returns the Java type for a DataType.
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def primitiveTypeName(dt: DataType): String
-
def
primitiveTypeName(jt: String): String
Returns the name used in accessor and setter for a Java primitive type.
-
val
primitiveTypes: Seq[String]
List of java primitive data types
-
def
setArrayElement(array: String, elementType: DataType, i: String, value: String, isNull: Option[String] = None): String
Generates code of setter for an ArrayData.
-
def
setColumn(row: String, dataType: DataType, ordinal: Int, value: String): String
Returns the code to update a column in Row for a given DataType.
-
def
setValue(vector: String, rowId: String, dataType: DataType, value: String): String
Returns the specialized code to set a given value in a column vector for a given
DataType. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def typeName(clazz: Class[_]): String
-
def
updateColumn(vector: String, rowId: String, dataType: DataType, ev: ExprCode, nullable: Boolean): String
Returns the specialized code to set a given value in a column vector for a given
DataTypethat could potentially be nullable. -
def
updateColumn(row: String, dataType: DataType, ordinal: Int, ev: ExprCode, nullable: Boolean, isVectorized: Boolean = false): String
Update a column in MutableRow from ExprCode.
Update a column in MutableRow from ExprCode.
- isVectorized
True if the underlying row is of type
ColumnarBatch.Row, false otherwise
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()