CreateStruct Function Builder¶
CreateStruct
is a <Seq[Expression] => Expression
) that can <
=== [[registryEntry]] Metadata of struct Function -- registryEntry
Property
[source, scala]¶
registryEntry: (String, (ExpressionInfo, FunctionBuilder))¶
registryEntry
...FIXME
NOTE: registryEntry
is used exclusively when FunctionRegistry
is requested for the <
=== [[apply]] Creating CreateNamedStruct Expression -- apply
Method
[source, scala]¶
apply(children: Seq[Expression]): CreateNamedStruct¶
NOTE: apply
is part of Scala's https://www.scala-lang.org/api/2.11.12/index.html#scala.Function1[scala.Function1] contract to create a function of one parameter (e.g. Seq[Expression]
).
apply
creates a <children
<
-
For <
> expressions that are < >, apply
creates a pair of a <> expression (with the < > of the NamedExpression
) and theNamedExpression
itself -
For <
> expressions that are not < > yet, apply
creates a pair of aNamePlaceholder
expression and theNamedExpression
itself -
For all other <
>, apply
creates a pair of a <> expression (with the value as col[index]
) and theExpression
itself
apply
is used when:
-
ResolveReferences
logical resolution rule is requested to expandStarExpression -
InConversion
type coercion rule is requested to coerceTypes -
ExpressionEncoder
is requested to create an ExpressionEncoder for a tuple -
Stack
generator expression is requested to <> -
AstBuilder
is requested to parse a <> and < > -
ColumnStat
is requested to <> -
KeyValueGroupedDataset
is requested to aggUntyped (when KeyValueGroupedDataset.agg typed operator is used) -
<
> typed transformation is used -
<
> standard function is used -
SimpleTypedAggregateExpression
expression is requested for the <> and < >