Spark supported types
A table that maps CQL types to Scala types.
This table maps CQL types to Scala types. In DataStax Enterprise 4.5, all
CQL types are supported by the DataStax Enterprise Spark integration. Other type conversions
might work, but cause loss of precision or not work for all values. Most types are convertible to
strings. You can convert strings that conform to the CQL standard to numbers, dates, addresses or
uuids. You can convert maps to or from sequences of key-value tuples.
CQL Type | Scala Type |
---|---|
ascii | String |
bigint | Long |
blob | ByteBuffer, Array |
boolean | Boolean |
counter | Long |
decimal | BigDecimal, java.math.BigDecimal |
double | Double |
float | Float |
inet | java.net.InetAddress |
int | Int |
list | Vector, List, Iterable, Seq, IndexedSeq, java.util.List |
map | Map, TreeMap, java.util.HashMap |
set | Set, TreeSet, java.util.HashSet |
text, varchar | String |
timestamp | Long, java.util.Date, java.sql.Date, org.joda.time.DateTime |
timeuuid | java.util.UUID |
uuid | java.util.UUID |
varint | BigInt, java.math.BigInteger |
nullable values | Option |