Package org.apache.spark.sql.types
Class StringHelper
Object
org.apache.spark.sql.types.StringHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract static booleanabstract static booleanstatic booleanstatic booleangt(T x, T y) static booleanstatic booleanstatic booleanstatic booleanlt(T x, T y) static booleanstatic DataTypeStrip CHAR/VARCHAR length constraints, preserving collation.static StringTypeabstract static intabstract static ObjectproductElement(int n) static StringproductElementName(int n) static scala.collection.Iterator<String> static scala.collection.Iterator<Object> static Stringstatic StringTypestatic scala.math.PartialOrdering<T> reverse()static scala.Option<StringType> tightestCommonString(StringType s1, StringType s2) Least common string type: CHAR -> VARCHAR -> STRING, with length max(n, m) when the result remains CHAR or VARCHAR.static scala.Option<Object>
-
Constructor Details
-
StringHelper
public StringHelper()
-
-
Method Details
-
tryCompare
-
lteq
-
gteq
-
equiv
-
isPlainString
-
plainStringType
Strip CHAR/VARCHAR length constraints, preserving collation.Used by transforming string expressions (upper, substr, concat, ...) so their result type is plain STRING even when inputs are CharType/VarcharType, when standard semantics are on.
- Parameters:
dt- (undocumented)- Returns:
- (undocumented)
-
plainStringType
-
isMoreConstrained
-
tightestCommonString
Least common string type: CHAR -> VARCHAR -> STRING, with length max(n, m) when the result remains CHAR or VARCHAR.When first-class CHAR/VARCHAR are off, always widens to unbounded STRING (legacy annotated-STRING path where Char/Varchar do not appear in plans).
- Parameters:
s1- (undocumented)s2- (undocumented)- Returns:
- (undocumented)
-
removeCollation
-
lt
public static boolean lt(T x, T y) -
gt
public static boolean gt(T x, T y) -
reverse
public static scala.math.PartialOrdering<T> reverse() -
canEqual
-
equals
-
productArity
public abstract static int productArity() -
productElement
-
productIterator
-
productPrefix
-
productElementName
-
productElementNames
-