Skip to content

PartitionerExpr Unary Expression

PartitionerExpr is a UnaryExpression (Spark SQL) that represents RangePartitionId unary expression at execution (after RangePartitionIdRewrite optimization rule).

Creating Instance

PartitionerExpr takes the following to be created:

PartitionerExpr is created when:

Interpreted Expression Evaluation

eval(
  input: InternalRow): Any

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


eval requests the child expression to eval for the given InternalRow and uses the evaluation result to update the GenericInternalRow at 0th position.

In the end, eval requests the Partitioner to getPartition for the just-updated GenericInternalRow.

Code-Generated Expression Evaluation

doGenCode(
  ctx: CodegenContext,
  ev: ExprCode): ExprCode

doGenCode...FIXME

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

Evaluation Result DataType

dataType: DataType

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


dataType is always IntegerType.

nullable

nullable: Boolean

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


nullable is always false.