object SelectedField
A Scala extractor that builds a org.apache.spark.sql.types.StructField from a Catalyst complex type extractor. For example, consider a relation with the following schema:
root |-- name: struct (nullable = true) | |-- first: string (nullable = true) | |-- last: string (nullable = true)
Further, suppose we take the select expression name.first. This will parse into an
Alias(child, "first"). Ignoring the alias, child matches the following pattern:
GetStructFieldObject( AttributeReference("name", StructType(_), _, _), StructField("first", StringType, _, _))
SelectedField converts that expression into
StructField("name", StructType(Array(StructField("first", StringType))))
by mapping each complex type extractor to a org.apache.spark.sql.types.StructField with the same name as its child (or "parent" going right to left in the select expression) and a data type appropriate to the complex type extractor. In our example, the name of the child expression is "name" and its data type is a org.apache.spark.sql.types.StructType with a single string field named "first".
- Alphabetic
- By Inheritance
- SelectedField
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unapply(expr: Expression): Option[StructField]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()