Package org.apache.spark.sql.types
Class VariantType
Object
org.apache.spark.sql.types.DataType
org.apache.spark.sql.types.VariantType
The data type representing semi-structured values with arbitrary hierarchical data structures.
It is intended to store parsed JSON values and most other data types in the system (e.g., it
cannot store a map with a non-string key type).
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract static booleanstatic StringintThe default size of a value of this data type, used internally for size estimation.abstract static booleanstatic Stringjson()static 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()static StringtypeName()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, typeName
-
Constructor Details
-
VariantType
public VariantType()
-
-
Method Details
-
typeName
-
json
-
prettyJson
-
simpleString
-
catalogString
-
sql
-
canEqual
-
equals
-
productArity
public abstract static int productArity() -
productElement
-
productIterator
-
productPrefix
-
productElementName
-
productElementNames
-
defaultSize
public int defaultSize()Description copied from class:DataTypeThe default size of a value of this data type, used internally for size estimation.- Specified by:
defaultSizein classDataType- Returns:
- (undocumented)
-