incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Naryshkin <konstant...@a-bb.net>
Subject cqlsh not returning the column name of the first column when reversed
Date Tue, 06 Dec 2011 20:51:32 GMT
I am running Cassandra 1.0.0. I am using cqlsh for inspecting my data
(very useful tool, thank you whoever wrote it). I notice that when I
query for the FIRST N REVERSED column, it is omitting the column name
on the first column. For example,
cqlsh> SELECT FIRST 1 REVERSED * FROM netflow_raw;
'{"body":{"src_as":0,"srcport":0,"dstport":148,"nexthop":"0.0.0.0","First":607502600,"prot":2,"src_mask":24,"tos":-64,"input":9721,"Last":607502600,"dOctets":40,"tcp_flags":16,"dst_as":0,"dstaddr":"224.0.0.22","dPkts":1,"output":0,"dst_mask":0,"srcaddr":"172.30.3.5"},"header":{"Sequence
Number":75569,"RouterIP":"172.29.1.3","UNIX
Seconds":1323201095,"Source ID":0,"System
Uptime":607525604},"version":9}' | 'KEY','172.29.1.3,10311323198000'
cqlsh> SELECT FIRST 2 REVERSED * FROM netflow_raw;

Notice that the KEY is given but not the column name of the single column.

When I ask for more than one column, only one of them has the column
name omitted:

cqlsh> SELECT FIRST 2 REVERSED * FROM netflow_raw;
'{"body":{"src_as":0,"srcport":68,"dstport":67,"nexthop":"0.0.0.0","First":607497540,"prot":17,"src_mask":24,"tos":16,"input":9721,"Last":607554532,"dOctets":1968,"tcp_flags":16,"dst_as":0,"dstaddr":"255.255.255.255","dPkts":6,"output":0,"dst_mask":0,"srcaddr":"172.30.3.5"},"header":{"Sequence
Number":75571,"RouterIP":"172.29.1.3","UNIX
Seconds":1323201132,"Source ID":0,"System
Uptime":607562604},"version":9}' |
'1323201132,0.0.0.0,0000000011','{"body":{"src_as":0,"srcport":0,"dstport":148,"nexthop":"0.0.0.0","First":607540516,"prot":2,"src_mask":0,"tos":-64,"input":2,"Last":607540516,"dOctets":32,"tcp_flags":16,"dst_as":0,"dstaddr":"224.0.0.1","dPkts":1,"output":0,"dst_mask":0,"srcaddr":"0.0.0.0"},"header":{"Sequence
Number":75571,"RouterIP":"172.29.1.3","UNIX
Seconds":1323201132,"Source ID":0,"System
Uptime":607562604},"version":9}' | 'KEY','172.29.1.3,10311323198000'

This is not an issue when we do not do reversed queries:

cqlsh> SELECT FIRST 1 * FROM netflow_raw;
'172.29.1.3,10311323198000' |
'1323201033,172.30.3.2,0000000002','{"body":{"src_as":0,"srcport":0,"dstport":148,"nexthop":"0.0.0.0","First":607445536,"prot":2,"src_mask":24,"tos":-64,"input":9721,"Last":607445536,"dOctets":32,"tcp_flags":16,"dst_as":0,"dstaddr":"224.0.0.251","dPkts":1,"output":0,"dst_mask":0,"srcaddr":"172.30.3.2"},"header":{"Sequence
Number":75564,"RouterIP":"172.29.1.3","UNIX
Seconds":1323201033,"Source ID":0,"System
Uptime":607463584},"version":9}'

cqlsh> SELECT FIRST 2 * FROM netflow_raw;
'172.29.1.3,10311323198000' |
'1323201033,172.30.3.2,0000000002','{"body":{"src_as":0,"srcport":0,"dstport":148,"nexthop":"0.0.0.0","First":607445536,"prot":2,"src_mask":24,"tos":-64,"input":9721,"Last":607445536,"dOctets":32,"tcp_flags":16,"dst_as":0,"dstaddr":"224.0.0.251","dPkts":1,"output":0,"dst_mask":0,"srcaddr":"172.30.3.2"},"header":{"Sequence
Number":75564,"RouterIP":"172.29.1.3","UNIX
Seconds":1323201033,"Source ID":0,"System
Uptime":607463584},"version":9}' |
'1323201033,172.30.3.3,0000000001','{"body":{"src_as":0,"srcport":0,"dstport":148,"nexthop":"0.0.0.0","First":607445000,"prot":2,"src_mask":24,"tos":-64,"input":9721,"Last":607445000,"dOctets":32,"tcp_flags":16,"dst_as":0,"dstaddr":"224.0.0.251","dPkts":1,"output":0,"dst_mask":0,"srcaddr":"172.30.3.3"},"header":{"Sequence
Number":75564,"RouterIP":"172.29.1.3","UNIX
Seconds":1323201033,"Source ID":0,"System
Uptime":607463584},"version":9}'


I am not using cql for anything other than debugging purposes so I do
not care when this bug is fixed, I just wanted to make people aware of
it.

Mime
View raw message