"get X as LongType" will give you the bytes in that column value
interpreted as a long.

So it did exactly what you asked it to do :)

On Mon, Jul 18, 2011 at 4:16 PM, Sameer Farooqui
<cassandral...@gmail.com> wrote:
> I wrote some data to a standard column family (using Hector) with ASCII
> row-key, Long column name and Double column value.
>
> The CLI doesn't seem to have a double data type to interpret the column
> value for display.
>
> [default@DemoKS] get DemoCF[ascii('ABC_100000000020')][long(20090101000000)]
> as LongType;
> => (column=0000124597556740, value=4629084924887308954,
> timestamp=1310144024947000)
>
> But that value is not exactly correct. It should be: 29.813332976331914
>
>
> This is how I do the read in Hector:
>
>         ColumnQuery<String, Long, Double> columnQuery =
> HFactory.createColumnQuery(keyspace, ss, ls, ds);
>
>
> columnQuery.setColumnFamily("DemoCF").setKey("ABC_100000000020").setName(20090101000000L);
>
>         QueryResult<HColumn<Long, Double>> result = columnQuery.execute();
>
>         System.out.println("Query result: " + result.get());
>
>
> Is there a equivalent for that in Cassandra CLI?
>
> - Sameer
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Reply via email to