Package org.apache.spark.sql.types
Class StringType
Object
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.StringType
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CharType
,VarcharType
The data type representing
String
values. Please use the singleton DataTypes.StringType
.
- Since:
- 1.3.0 param: collationId The id of collation for this StringType.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringType
abstract static boolean
static String
int
int
The default size of a value of the StringType is 20 bytes.boolean
int
hashCode()
static String
json()
static String
abstract static int
abstract static Object
productElement
(int n) static String
productElementName
(int n) static scala.collection.Iterator<String>
static scala.collection.Iterator<Object>
static String
static String
static String
sql()
toString()
typeName()
Type name that is shown to the customer.Methods inherited from class org.apache.spark.sql.types.DataType
catalogString, COLLATIONS_METADATA_KEY, equalsIgnoreCaseAndNullability, equalsIgnoreNullability, equalsStructurally, equalsStructurallyByName, fromDDL, fromJson, json, parseTypeWithFallback, prettyJson, simpleString, sql
-
Method Details
-
apply
-
json
-
prettyJson
-
simpleString
-
catalogString
-
sql
-
canEqual
-
productArity
public abstract static int productArity() -
productElement
-
productIterator
-
productPrefix
-
productElementName
-
productElementNames
-
collationId
public int collationId() -
constraint
-
typeName
Type name that is shown to the customer. If this is an UTF8_BINARY collation output isstring
due to backwards compatibility. -
toString
-
equals
-
hashCode
public int hashCode() -
defaultSize
public int defaultSize()The default size of a value of the StringType is 20 bytes.- Specified by:
defaultSize
in classDataType
- Returns:
- (undocumented)
-