Packages

case class NameTarget(candidates: Seq[Expression], aliasName: Option[String] = None, lateralAttributeReference: Option[Attribute] = None, output: Seq[Attribute] = Seq.empty) 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.

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.

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, lateralAttributeReference: Option[Attribute] = None, output: Seq[Attribute] = Seq.empty)

    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.

    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.

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 aliasName: Option[String]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val candidates: Seq[Expression]
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. val lateralAttributeReference: Option[Attribute]
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  15. val output: Seq[Attribute]
  16. 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.

  17. def productElementNames: Iterator[String]
    Definition Classes
    Product
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. 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