Skip to content

BindReferences

BindReferences utility allows to bind (resolve) one or multiple AttributeReferences.

Binding One AttributeReference

bindReference[A <: Expression](
  expression: A,
  input: AttributeSeq,
  allowFailures: Boolean = false): A

For every AttributeReference expression in the given expression, bindReference finds the ExprId in the input schema and creates a BoundReference expression.


bindReference throws an IllegalStateException when an AttributeReference could not be found in the input schema:

Couldn't find [a] in [input]

bindReference is used when:

Binding Multiple AttributeReferences

bindReferences[A <: Expression](
  expressions: Seq[A],
  input: AttributeSeq): Seq[A]

bindReferences bindReference of all the given expressions to the input schema.