It is not possible. Internally Cassandra flattens your data out into a set
of key-value-pairs. All collection types, including lists, are nothing more
than a thin layer of schema over a clustered set of key-value-pairs, so on
disk there is no difference between an empty list and a list that doesn't
exist. If you need to differentiate between the two, you will need a
separate "isSet" column that is a 1 or a 0 to indicate the presence or
absence of a list and write your client-side code to branch on that new
column instead.

Thanks,
Cody

On Tue, Nov 29, 2016 at 6:47 AM, Selvam Raman <sel...@gmail.com> wrote:

> Filed Type in cassandra : List<Text>
>
> I am trying to insert  Collections.emptyList() from spark to cassandra
> list<Text> field. In cassandra it stores as null object.
>
> How can i avoid null values here.
>
> --
> Selvam Raman
> "லஞ்சம் தவிர்த்து நெஞ்சம் நிமிர்த்து"
>

Reply via email to