Skip to content

Literal Leaf Expression

Literal is a leaf expression that is <> to represent a Scala <> of a <>.

[[properties]] .Literal's Properties [width="100%",cols="1,2",options="header"] |=== | Property | Description

| foldable | [[foldable]] Enabled (i.e. true)

| nullable | [[nullable]] Enabled when <> is null |===

=== [[create]] Creating Literal Instance -- create Object Method

[source, scala]

create(v: Any, dataType: DataType): Literal

create uses CatalystTypeConverters helper object to convert the input v Scala value to a Catalyst rows or types and creates a <> (with the Catalyst value and the input DataType).

Creating Instance

Literal takes the following when created:

  • [[value]] Scala value (of type Any)
  • [[dataType]] DataType

=== [[doGenCode]] Generating Java Source Code (ExprCode) For Code-Generated Expression Evaluation -- doGenCode Method

[source, scala]

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

NOTE: doGenCode is part of <> to generate a Java source code (ExprCode) for code-generated expression evaluation.

doGenCode...FIXME


Last update: 2021-05-20