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
aliasNameshould be the name with which the candidate needs to be aliased. Otherwise,aliasNameisNone.- 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.
- Alphabetic
- By Inheritance
- NameTarget
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
aliasNameshould be the name with which the candidate needs to be aliased. Otherwise,aliasNameisNone.- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val aliasName: Option[String]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val candidates: Seq[Expression]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val lateralAttributeReference: Option[Attribute]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- val output: Seq[Attribute]
- def pickCandidate(unresolvedAttribute: UnresolvedAttribute): Expression
Pick a single candidate from
candidates: - If there are no candidates, throwUNRESOLVED_COLUMN.WITH_SUGGESTION.Pick a single candidate from
candidates: - If there are no candidates, throwUNRESOLVED_COLUMN.WITH_SUGGESTION. - If there are several candidates, throwAMBIGUOUS_REFERENCE. - Otherwise, return a single Expression. - def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)