Packages

case class NameTarget(candidates: Seq[Expression], aliasName: Option[String] = None, aliasMetadata: Option[Metadata] = None, lateralAttributeReference: Option[Attribute] = None, output: Seq[Attribute] = Seq.empty, isOuterReference: Boolean = false) extends Product with Serializable

NameTarget is a result of a multipart name resolution of the NameScope.resolveMultipartName.

Attribute resolution:

-- [[NameTarget]] with a single candidate `col1`. `aliasName` is be `None` in this case because
-- the name is not a field/value/item of some recursive type.
SELECT col1 FROM VALUES (1);

Attribute resolution ambiguity:

-- [[NameTarget]] with candidates `col1`, `col1`. [[pickCandidate]] will throw
-- `AMBIGUOUS_REFERENCE`.
SELECT col1 FROM VALUES (1) t1, VALUES (2) t2;

Struct field resolution:

-- [[NameTarget]] with a single candidate `GetStructField(col1, "field1")`. `aliasName` is
-- `Some("col1")`, since here we extract a field of a struct.
SELECT col1.field1 FROM VALUES (named_struct('field1', 1), 3);
candidates

A list of candidates that are possible matches for a given name.

aliasName

If the candidates size is 1 and it's type is ExtractValue (which means that it's a field/value/item from a recursive type), then the aliasName should be the name with which the candidate needs to be aliased. Otherwise, aliasName is None.

aliasMetadata

If the candidates were created out of expressions referenced by group by alias, store the metadata of the alias. Otherwise, aliasMetadata is None.

lateralAttributeReference

If the candidate is laterally referencing another column this field is populated with that column's attribute.

output

output of a NameScope that produced this NameTarget. Used to provide suggestions for thrown errors.

isOuterReference

A flag indicating that this NameTarget resolves to an outer reference.

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NameTarget
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new NameTarget(candidates: Seq[Expression], aliasName: Option[String] = None, aliasMetadata: Option[Metadata] = None, lateralAttributeReference: Option[Attribute] = None, output: Seq[Attribute] = Seq.empty, isOuterReference: Boolean = false)

    candidates

    A list of candidates that are possible matches for a given name.

    aliasName

    If the candidates size is 1 and it's type is ExtractValue (which means that it's a field/value/item from a recursive type), then the aliasName should be the name with which the candidate needs to be aliased. Otherwise, aliasName is None.

    aliasMetadata

    If the candidates were created out of expressions referenced by group by alias, store the metadata of the alias. Otherwise, aliasMetadata is None.

    lateralAttributeReference

    If the candidate is laterally referencing another column this field is populated with that column's attribute.

    output

    output of a NameScope that produced this NameTarget. Used to provide suggestions for thrown errors.

    isOuterReference

    A flag indicating that this NameTarget resolves to an outer reference.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val aliasMetadata: Option[Metadata]
  5. val aliasName: Option[String]
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val candidates: Seq[Expression]
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. val isOuterReference: Boolean
  13. val lateralAttributeReference: Option[Attribute]
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. val output: Seq[Attribute]
  18. def pickCandidate(unresolvedAttribute: UnresolvedAttribute): Expression

    Pick a single candidate from candidates: - If there are no candidates, throw UNRESOLVED_COLUMN.WITH_SUGGESTION.

    Pick a single candidate from candidates: - If there are no candidates, throw UNRESOLVED_COLUMN.WITH_SUGGESTION. - If there are several candidates, throw AMBIGUOUS_REFERENCE. - Otherwise, return a single Expression.

  19. def productElementNames: Iterator[String]
    Definition Classes
    Product
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped