Package org.apache.spark.sql.types
Class CharType
Object
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.StringType
org.apache.spark.sql.types.CharType
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
A data type representing fixed-length character strings with a specified length.
param: length
The fixed length of the char string (must be non-negative)
param: collation
Optional collation ID for string comparison and sorting. If None, uses
UTF8_BINARY_COLLATION_ID. The reason for using an Option is to be able to see in the
analyzer whether the collation was explicitly specified or not.
- See Also:
-
Method Summary
Methods inherited from class org.apache.spark.sql.types.StringType
apply, canEqual, catalogString, collationId, constraint, equals, hashCode, json, prettyJson, productArity, productElement, productElementName, productElementNames, productIterator, productPrefix, simpleString, sqlMethods inherited from class org.apache.spark.sql.types.DataType
catalogString, COLLATIONS_METADATA_KEY, equalsIgnoreCaseAndNullability, equalsIgnoreNullability, equalsStructurally, equalsStructurallyByName, fromDDL, fromJson, json, parseTypeWithFallback, prettyJson, simpleString, sqlMethods inherited from interface scala.Equals
canEqual, equalsMethods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Method Details
-
apply
-
apply
-
apply
-
length
public int length() -
collation
-
defaultSize
public int defaultSize()Description copied from class:StringTypeThe default size of a value of the StringType is 20 bytes.- Overrides:
defaultSizein classStringType- Returns:
- (undocumented)
-
typeName
Description copied from class:StringTypeType name that is shown to the customer. If this is an UTF8_BINARY collation output isstringdue to backwards compatibility.- Overrides:
typeNamein classStringType- Returns:
- (undocumented)
-
toString
- Overrides:
toStringin classStringType
-
toStringType
-