Class SparkMap
- java.lang.Object
-
- org.apache.cassandra.spark.data.converter.types.complex.SparkMap
-
- All Implemented Interfaces:
java.util.Comparator<java.lang.Object>,SparkType
public class SparkMap extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SparkMap(SparkSqlTypeConverter converter, org.apache.cassandra.spark.data.CqlField.CqlMap map)
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description org.apache.cassandra.spark.data.CqlField.CqlCollectioncollection()intcompareTo(java.lang.Object first, java.lang.Object second)SparkSqlTypeConverterconverter()org.apache.spark.sql.types.DataTypedataType(org.apache.cassandra.bridge.BigNumberConfig bigNumberConfig)booleanequalsTo(java.lang.Object first, java.lang.Object second)default SparkTypekeyType()default intsize()java.lang.ObjectsparkSqlRowValue(org.apache.spark.sql.catalyst.expressions.GenericInternalRow row, int position)java.lang.ObjectsparkSqlRowValue(org.apache.spark.sql.Row row, int position)default SparkTypesparkType()default SparkTypesparkType(int position)default java.util.List<SparkType>sparkTypes()java.lang.ObjecttoSparkSqlType(java.lang.Object value, boolean isFrozen)java.lang.ObjecttoTestRowType(java.lang.Object value)default SparkTypevalueType()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.apache.cassandra.spark.data.converter.types.SparkType
compare, dataType, equals, nativeSparkSqlRowValue, nativeSparkSqlRowValue
-
-
-
-
Constructor Detail
-
SparkMap
public SparkMap(SparkSqlTypeConverter converter, org.apache.cassandra.spark.data.CqlField.CqlMap map)
-
-
Method Detail
-
dataType
public org.apache.spark.sql.types.DataType dataType(org.apache.cassandra.bridge.BigNumberConfig bigNumberConfig)
-
toSparkSqlType
public java.lang.Object toSparkSqlType(@NotNull java.lang.Object value, boolean isFrozen)- Specified by:
toSparkSqlTypein interfaceSparkType- Parameters:
value- the Cassandra value.isFrozen- true if the type is frozen.- Returns:
- the value mapped to the Spark equivalent data type.
-
sparkSqlRowValue
public java.lang.Object sparkSqlRowValue(org.apache.spark.sql.catalyst.expressions.GenericInternalRow row, int position)- Specified by:
sparkSqlRowValuein interfaceSparkType- Parameters:
row- a SparkSQL `org.apache.spark.sql.catalyst.expressions.GenericInternalRow`position- position in row- Returns:
- the SparkSQL value at `position` in the `row` converted back into test type - used only in the test system.
-
sparkSqlRowValue
public java.lang.Object sparkSqlRowValue(org.apache.spark.sql.Row row, int position)- Specified by:
sparkSqlRowValuein interfaceSparkType- Parameters:
row- a SparkSQL `org.apache.spark.sql.Row`position- position in row- Returns:
- the SparkSQL value at `position` in the `row` converted back into test type - used only in the test system.
-
toTestRowType
public java.lang.Object toTestRowType(java.lang.Object value)
- Specified by:
toTestRowTypein interfaceSparkType- Parameters:
value- SparkSQL value.- Returns:
- SparkSQL value converted back into test type - used only in the test system.
-
collection
public org.apache.cassandra.spark.data.CqlField.CqlCollection collection()
-
converter
public SparkSqlTypeConverter converter()
-
equalsTo
public boolean equalsTo(java.lang.Object first, java.lang.Object second)
-
compareTo
public int compareTo(java.lang.Object first, java.lang.Object second)
-
keyType
public default SparkType keyType()
-
valueType
public default SparkType valueType()
-
sparkTypes
public default java.util.List<SparkType> sparkTypes()
-
size
public default int size()
-
sparkType
public default SparkType sparkType()
-
sparkType
public default SparkType sparkType(int position)
-
-