Package org.apache.spark.sql.types
Class ExplicitUTF8BinaryStringType
Object
org.apache.spark.sql.types.ExplicitUTF8BinaryStringType
Used in the context of UDFs when resolving parameters/return types.
For example, if a UDF parameter is defined as p1 STRING COLLATE UTF8_BINARY, calling
typeName() will return just STRING, omitting the collation information. This causes the
parameter to be parsed into the companion object StringType. If the UDF has a default
collation specified, it will be applied to the companion object StringType, potentially
resulting in the construction of a StringType with an invalid collation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic intstatic StringConstraintstatic intstatic booleanstatic inthashCode()static Stringjson()static Stringstatic Stringstatic Stringsql()static StringtoString()static DataTypeTransforms the givendataTypeby replacing eachStringTypethat has an explicitUTF8_BINARYcollation withExplicitUTF8BinaryStringType.static DataTypetransformDefaultStringType(DataType dataType) Transforms the givendataTypeby replacing each companion objectStringTypewith explicitUTF8_BINARYStringType.static StringtypeName()
-
Constructor Details
-
ExplicitUTF8BinaryStringType
public ExplicitUTF8BinaryStringType()
-
-
Method Details
-
typeName
-
toString
-
transform
Transforms the givendataTypeby replacing eachStringTypethat has an explicitUTF8_BINARYcollation withExplicitUTF8BinaryStringType.- Parameters:
dataType- (undocumented)- Returns:
- (undocumented)
-
transformDefaultStringType
Transforms the givendataTypeby replacing each companion objectStringTypewith explicitUTF8_BINARYStringType.- Parameters:
dataType- (undocumented)- Returns:
- (undocumented)
-
json
-
prettyJson
-
simpleString
-
catalogString
-
sql
-
collationId
public static int collationId() -
constraint
-
equals
-
hashCode
public static int hashCode() -
defaultSize
public static int defaultSize()
-