Package org.apache.spark.types.variant
Class Variant
Object
org.apache.spark.types.variant.Variant
This class is structurally equivalent to
VariantVal. We
define a new class to avoid depending on or modifying Spark.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbyte[]booleandoublegetElementAtIndex(int index) getFieldAtIndex(int index) getFieldByKey(String key) floatgetFloat()longgetLong()byte[]getType()intbyte[]getValue()int
-
Constructor Details
-
Variant
public Variant(byte[] value, byte[] metadata)
-
-
Method Details
-
getValue
public byte[] getValue() -
getMetadata
public byte[] getMetadata() -
getBoolean
public boolean getBoolean() -
getLong
public long getLong() -
getYearMonthIntervalFields
-
getDayTimeIntervalFields
-
getDouble
public double getDouble() -
getDecimal
-
getFloat
public float getFloat() -
getBinary
public byte[] getBinary() -
getString
-
getTypeInfo
public int getTypeInfo() -
getType
-
objectSize
public int objectSize() -
getFieldByKey
-
getFieldAtIndex
-
arraySize
public int arraySize() -
getElementAtIndex
-
toJson
-