Asserts that input values of a non-nullable child expression are not null.
Constructs a new external row, using the result of evaluating the specified expressions as content.
Constructs a new external row, using the result of evaluating the specified expressions as content.
A list of expression to use as content of the external row.
Serializes an input object using a generic serializer (Kryo or Java).
Serializes an input object using a generic serializer (Kryo or Java). Note that the ClassTag is not an implicit parameter because TreeNode cannot copy implicit parameters.
if true, use Kryo. Otherwise, use Java.
Serializes an input object using a generic serializer (Kryo or Java).
Serializes an input object using a generic serializer (Kryo or Java).
if true, use Kryo. Otherwise, use Java.
Converts a Scala/Java map object into catalyst format, by applying the key/value converter when iterate the map.
Returns the value of field at index index
from the external row child
.
Returns the value of field at index index
from the external row child
.
This class can be viewed as GetStructField for Rows instead of InternalRows.
Note that the input row and the field we try to get are both guaranteed to be not null, if they are null, a runtime exception will be thrown.
Initialize a Java Bean instance by setting its field values via setters.
Calls the specified function on an object, optionally passing arguments.
Calls the specified function on an object, optionally passing arguments. If the targetObject
expression evaluates to null then null will be returned.
In some cases, due to erasure, the schema may expect a primitive type when in fact the method is returning java.lang.Object. In this case, we will generate code that attempts to unbox the value automatically.
An expression that will return the object to call the method on.
The name of the method to call.
The expected return type of the function.
An optional list of expressions, whos evaluation will be passed to the function.
When true, and any of the arguments is null, null will be returned instead of calling the function.
Common base class for StaticInvoke, Invoke, and NewInstance.
A place holder for the loop variable used in MapObjects.
A place holder for the loop variable used in MapObjects. This should never be constructed manually, but will instead be passed into the provided lambda function.
Applies the given expression to every element of a collection of items, returning the result as an ArrayType.
Applies the given expression to every element of a collection of items, returning the result as an ArrayType. This is similar to a typical map operation, but where the lambda function is expressed using catalyst expressions.
The following collection ObjectTypes are currently supported: Seq, Array, ArrayData, java.util.List
Constructs a new instance of the given class, using the result of evaluating the specified expressions as arguments.
Constructs a new instance of the given class, using the result of evaluating the specified expressions as arguments.
The class to construct.
A list of expression to use as arguments to the constructor.
When true, if any of the arguments is null, then null will be returned instead of trying to construct the object.
The type of object being constructed, as a Spark SQL datatype. This allows you to manually specify the type when the object in question is a valid internal representation (i.e. ArrayData) instead of an object.
If the object being constructed is an inner class, the outerPointer for the containing class must be specified. This parameter is defined as an optional function, which allows us to get the outer pointer lazily,and it's useful if the inner class is defined in REPL.
Invokes a static function, returning the result.
Invokes a static function, returning the result. By default, any of the arguments being null will result in returning null instead of calling the function.
The target of the static call. This can either be the object itself (methods defined on scala objects), or the class object (static methods defined in java).
The expected return type of the function call
The name of the method to call.
An optional list of expressions to pass as arguments to the function.
When true, and any of the arguments is null, null will be returned instead of calling the function.
Given an expression that returns on object of type Option[_]
, this expression unwraps the
option into the specified Spark SQL datatype.
Given an expression that returns on object of type Option[_]
, this expression unwraps the
option into the specified Spark SQL datatype. In the case of None
, the nullbit is set instead.
The expected unwrapped option type.
An expression that returns an Option
Validates the actual data type of input expression at runtime.
Validates the actual data type of input expression at runtime. If it doesn't match the expectation, throw an exception.
Converts the result of evaluating child
into an option, checking both the isNull bit and
(in the case of reference types) equality with null.
Converts the result of evaluating child
into an option, checking both the isNull bit and
(in the case of reference types) equality with null.
The expression to evaluate and wrap.
The type of this option.
Asserts that input values of a non-nullable child expression are not null.
Note that there are cases where
child.nullable == true
, while we still need to add this assertion. Consider a nullable columns
whose data type is a struct containing a non-nullableInt
field namedi
. Expressions.i
is nullable becauses
can be null. However, for all non-nulls
,s.i
can't be null.