No-arg constructor for kryo.
No-arg constructor for kryo.
Returns a StructType containing StructFields of the given names, preserving the original order of fields.
Returns a StructType containing StructFields of the given names, preserving the original order of fields. Those names which do not have matching fields will be ignored.
Extracts a StructField of the given name.
Extracts a StructField of the given name. If the StructType object does not
have a name matching the given name, null
will be returned.
The default size of a value of the StructType is the total default sizes of all field types.
The default size of a value of the StructType is the total default sizes of all field types.
Returns all field names in an array.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Matches any expression that evaluates to this DataType
Matches any expression that evaluates to this DataType
(Since version 2.10.0) use fold instead
:: DeveloperApi :: A StructType object can be constructed by
StructType(fields: Seq[StructField])
For a StructType object, one or multiple StructFields can be extracted by names. If multiple StructFields are extracted, a StructType object will be returned. If a provided name does not have a matching field, it will be ignored. For the case of extracting a single StructField, a
null
will be returned. Example:A org.apache.spark.sql.Row object is used as a value of the StructType. Example: