Package io.delta.kernel.types
Class StructType
Object
io.delta.kernel.types.DataType
io.delta.kernel.types.StructType
Struct type which contains one or more columns.
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(StructField field) add(String name, DataType dataType, boolean nullable, FieldMetadata metadata) add(String name, DataType dataType, FieldMetadata metadata) at(int index) column(int ordinal) Creates aColumnexpression for the field at the givenordinalbooleanbooleanequivalent(DataType dataType) Are the data types same? The metadata or column names could be different.fields()inthashCode()intintlength()toJson()Convert the data type to Delta protocol specified serialization format.toString()
-
Constructor Details
-
StructType
public StructType() -
StructType
-
-
Method Details
-
add
-
add
-
add
-
add
-
add
-
fields
- Returns:
- array of fields
-
fieldNames
- Returns:
- array of field names
-
length
public int length()- Returns:
- the number of fields
-
indexOf
-
get
-
at
-
column
Creates aColumnexpression for the field at the givenordinal- Parameters:
ordinal- the ordinal of theStructFieldto create a column for- Returns:
- a
Columnexpression for theStructFieldwith ordinalordinal
-
equivalent
Description copied from class:DataTypeAre the data types same? The metadata or column names could be different.- Overrides:
equivalentin classDataType- Returns:
-
toString
-
toJson
Description copied from class:DataTypeConvert the data type to Delta protocol specified serialization format. -
equals
-
hashCode
public int hashCode()
-