Skip to content

UnaryExpression

UnaryExpression is an extension of the Expression abstraction for expressions with a single child.

Contract

child

child: Expression

The child expression

Implementations

  • Alias
  • ArrayDistinct
  • ArrayMax
  • ArrayMin
  • BitwiseCount
  • CsvToStructs
  • MapEntries
  • MapKeys
  • MapValues
  • MultiAlias
  • PrintToStderr
  • SchemaOfCsv
  • others...

Interpreted Expression Evaluation

eval(
  input: InternalRow): Any

eval...FIXME

eval is part of the Expression abstraction.

defineCodeGen

defineCodeGen(
  ctx: CodegenContext,
  ev: ExprCode,
  f: String => String): ExprCode

defineCodeGen...FIXME

nullSafeCodeGen

nullSafeCodeGen(
  ctx: CodegenContext,
  ev: ExprCode,
  f: String => String): ExprCode

nullSafeCodeGen...FIXME

nullSafeCodeGen is used when...FIXME

nullSafeEval

nullSafeEval(
  input: Any): Any

nullSafeEval simply fails with the following error (and is expected to be overrided to save null-check code):

UnaryExpressions must override either eval or nullSafeEval

nullSafeEval is used when UnaryExpression is requested to evaluate (in interpreted mode).

Back to top