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
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringTypeabstract static booleanstatic StringintintThe default size of a value of the StringType is 20 bytes.booleaninthashCode()booleanbooleanstatic Stringjson()org.json4s.JValuestatic Stringabstract static intabstract static ObjectproductElement(int n) static StringproductElementName(int n) static scala.collection.Iterator<String>static scala.collection.Iterator<Object>static Stringstatic Stringstatic Stringsql()booleanSupport for Binary Equality implies that strings are considered equal only if they are byte for byte equal.booleanSupport for Binary Ordering implies that strings are considered equal only if they are byte for byte equal.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
-
Constructor Details
-
StringType
public StringType()
-
-
Method Details
-
apply
-
json
-
prettyJson
-
simpleString
-
catalogString
-
sql
-
canEqual
-
productArity
public abstract static int productArity() -
productElement
-
productIterator
-
productPrefix
-
productElementName
-
productElementNames
-
collationId
public int collationId() -
supportsBinaryEquality
public boolean supportsBinaryEquality()Support for Binary Equality implies that strings are considered equal only if they are byte for byte equal. E.g. all accent or case-insensitive collations are considered non-binary. If this field is true, byte level operations can be used against this datatype (e.g. for equality and hashing).- Returns:
- (undocumented)
-
isUTF8BinaryCollation
public boolean isUTF8BinaryCollation() -
isUTF8BinaryLcaseCollation
public boolean isUTF8BinaryLcaseCollation() -
supportsBinaryOrdering
public boolean supportsBinaryOrdering()Support for Binary Ordering implies that strings are considered equal only if they are byte for byte equal. E.g. all accent or case-insensitive collations are considered non-binary. Also their ordering does not require calls to ICU library, as it follows spark internal implementation. If this field is true, byte level operations can be used against this datatype (e.g. for equality, hashing and ordering).- Returns:
- (undocumented)
-
typeName
Type name that is shown to the customer. If this is an UTF8_BINARY collation output isstringdue to backwards compatibility. -
jsonValue
public org.json4s.JValue jsonValue() -
equals
-
hashCode
public int hashCode() -
defaultSize
public int defaultSize()The default size of a value of the StringType is 20 bytes.- Specified by:
defaultSizein classDataType- Returns:
- (undocumented)
-