Class StructField
- java.lang.Object
-
- com.snowflake.snowpark_java.types.StructField
-
public class StructField extends Object
Represents the content of StructType.- Since:
- 0.9.0
-
-
Constructor Summary
Constructors Constructor Description StructField(ColumnIdentifier columnIdentifier, DataType dataType)
Creates a new StructField with nullable column.StructField(ColumnIdentifier columnIdentifier, DataType dataType, boolean nullable)
Creates a new StructField.StructField(String name, DataType dataType)
Creates a new StructField with nullable column.StructField(String name, DataType dataType, boolean nullable)
Creates a new StructField.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnIdentifier
columnIdentifier()
Retrieves the column identifier.DataType
dataType()
Retrieves the column data type.boolean
equals(Object other)
Verifies if a StructField equals to this one.int
hashCode()
Calculates the hash code of this StructField Object.String
name()
Retrieves the column name.boolean
nullable()
Verifies if this column is nullable.String
toString()
Generates a String value to represent this StructField.
-
-
-
Constructor Detail
-
StructField
public StructField(ColumnIdentifier columnIdentifier, DataType dataType, boolean nullable)
Creates a new StructField.- Parameters:
columnIdentifier
- A ColumnIdentifier presenting column namedataType
- The column data typenullable
- Whether the column is nullable or not- Since:
- 0.9.0
-
StructField
public StructField(ColumnIdentifier columnIdentifier, DataType dataType)
Creates a new StructField with nullable column.- Parameters:
columnIdentifier
- A ColumnIdentifier presenting column namedataType
- The column data type- Since:
- 0.9.0
-
StructField
public StructField(String name, DataType dataType, boolean nullable)
Creates a new StructField.- Parameters:
name
- The column namedataType
- The column data typenullable
- Whether the column is nullable or not- Since:
- 0.9.0
-
-
Method Detail
-
name
public String name()
Retrieves the column name.- Returns:
- A String value representing the column name
- Since:
- 0.9.0
-
columnIdentifier
public ColumnIdentifier columnIdentifier()
Retrieves the column identifier.- Returns:
- A ColumnIdentifier representing the column name
- Since:
- 0.9.0
-
dataType
public DataType dataType()
Retrieves the column data type.- Returns:
- A DataType object representing the column data type
- Since:
- 0.9.0
-
nullable
public boolean nullable()
Verifies if this column is nullable.- Returns:
- A boolean value representing whether this column is nullable
- Since:
- 0.9.0
-
toString
public String toString()
Generates a String value to represent this StructField.
-
equals
public boolean equals(Object other)
Verifies if a StructField equals to this one.
-
-