Attribute — Base of Leaf Named Expressions

Attribute is the base of leaf named expressions.

Note
QueryPlan uses Attributes to build the schema of the query (it represents).
package org.apache.spark.sql.catalyst.expressions

abstract class Attribute extends ... {
  // only required properties (vals and methods) that have no implementation
  // the others follow
  def withMetadata(newMetadata: Metadata): Attribute
  def withName(newName: String): Attribute
  def withNullability(newNullability: Boolean): Attribute
  def withQualifier(newQualifier: Option[String]): Attribute
  def newInstance(): Attribute
}
Table 1. Attribute Contract
Property Description

withMetadata

withName

withNullability

withQualifier

newInstance

When requested for references, Attribute gives the reference to itself only.

As a NamedExpression, Attribute gives the reference to itself only when requested for toAttribute.

Table 2. Attributes (Direct Implementations)
Attribute Description

AttributeReference

PrettyAttribute

UnresolvedAttribute

As an optimization, Attribute is marked as to not tolerate nulls, and when given a null input produces a null output.

results matching ""

    No results matching ""