ColumnDefinition has a "type" attribute.

On Thu, Aug 28, 2014 at 9:27 AM, Arindam Bose <arindambos...@gmail.com>
wrote:

> Thank you so much! Worked perfectively! Also had a condition for which was
> only getting one row for every match of the cell names. Removed that and
> getting all the cells.
>
> I am also having an issue for quite sometime. Hoping some may have a
> solution to it a well - When I am getting a callback for a row based custom
> secondary index, I can identify if the column is a collection type
> (maptype, listtype, set) or not. But not able to identify the data type for
> the values from the columndefinition.
>
> For eg: a column having a collection as MapType(<UTF8Type>, <Int32Type>),
> is there a way to know from the column definition that the value would be
> of type Int32Type. Or I would have to do the instanceOf to match with every
> possibility.
>
>
>
> Regards,
> Arindam Bose
> +1 469-231-3862
> Dallas, TX
>
>
> On Wed, Aug 27, 2014 at 4:54 PM, Tyler Hobbs <ty...@datastax.com> wrote:
>
> > On Wed, Aug 27, 2014 at 3:28 PM, Arindam Bose <arindambos...@gmail.com>
> > wrote:
> >
> > >
> > > Also, the code as below, is returning me a list of cells but there is
> > only
> > > 1 cell matching the name "mymap". What is the missing piece in here?
> >
> >
> > The cell names are composites.  They look like (clustering_column_1,
> > clustering_column_2, ..., clustering_column_n, "mymap", map_key).  To
> make
> > that work with your current code, you would do something like see if
> > cell.name().cql3ColumnName(baseCfs.metadata).toString().equals("mymap")
> is
> > true.
> >
> > However, it would be more efficient to just limit your slice to that
> > collection.
> >
> > --
> > Tyler Hobbs
> > DataStax
> >
>



-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Reply via email to