Skip to content

InterleaveBits Expression

InterleaveBits is an Expression (Spark SQL) for interleave_bits function.

Creating Instance

InterleaveBits takes the following to be created:

InterleaveBits is created when:

Interpreted Expression Evaluation

eval(
  input: InternalRow): Any

eval is part of the Expression (Spark SQL) abstraction.


eval requests all the child expressions to eval (with the given InternalRow). eval replaces null values with 0, keeps Int-typed results and throws an IllegalArgumentException for others:

[name] expects only inputs of type Int, but got: [any] of type [type]

eval updates the ints array with the values.

eval computes Z-values for all the multidimensional data points (cf. Z-order curve).

In the end, eval returns a byte array (4 times larger than the number of children expressions).

ExpectsInputTypes

InterleaveBits is an ExpectsInputTypes (Spark SQL).

inputTypes

inputTypes: Seq[DataType]

inputTypes is part of the ExpectsInputTypes (Spark SQL) abstraction.


inputTypes is IntegerType for all the child expressions.

CodegenFallback

InterleaveBits is an CodegenFallback (Spark SQL).

Evaluation Result DataType

dataType: DataType

dataType is part of the Expression (Spark SQL) abstraction.


dataType is always BinaryType.

nullable

nullable: Boolean

nullable is part of the Expression (Spark SQL) abstraction.

nullable is always false.