Cassandra日期范围选择以提供数据

Cassandra日期范围选择以提供数据,cassandra,cassandra-2.0,cqlsh,Cassandra,Cassandra 2.0,Cqlsh,我的cassandra查询在获取特定日期时间范围内的数据时遇到了一个问题。 我的问题如下 select * from table1 where column1='abc' and time>='2015-11-13 10:43:55' and time<='2015-11-13 11:48:14' 但是如果执行下面的查询(时间少于),我将无法获取数据 select * from table1 where colimn1='abc' and time<='2015-11-13

我的cassandra查询在获取特定日期时间范围内的数据时遇到了一个问题。 我的问题如下

select * from table1 where column1='abc' and time>='2015-11-13 10:43:55' and time<='2015-11-13 11:48:14'
但是如果执行下面的查询(时间少于),我将无法获取数据

select * from table1 where colimn1='abc' and time<='2015-11-13 11:48:14'

从colimn1='abc'和time的表1中选择*很难说没有看到您的表数据,但我有一个基于经验的想法

您最初是如何保存时间戳值的?您是否插入了没有毫秒的时间戳?或者您是否使用了
dateof(now())

我很想看到以下的输出:

SELECT column1, time, blobAsBigint(timestampAsBlob(time)) FROM table1
WHERE column1='abc' AND time>'2015-11-13 10:43:55';

blobAsBigint(timestassablob(time))
列中,最后3位数字是零吗?如果没有,则您的
时间
值存在毫秒。查询2015-11-13 11:48:14时间和
时间很难说没有看到您的表格数据,但我有一个基于经验的想法

您最初是如何保存时间戳值的?您是否插入了没有毫秒的时间戳?或者您是否使用了
dateof(now())

我很想看到以下的输出:

SELECT column1, time, blobAsBigint(timestampAsBlob(time)) FROM table1
WHERE column1='abc' AND time>'2015-11-13 10:43:55';

blobAsBigint(timestassablob(time))
列中,最后3位数字是零吗?如果没有,则您的
时间
值存在毫秒。使用
time查询2015-11-13 11:48:14时间时间的值来自服务,它使用java.util.Date存储数据。timestamp中time列的datetype…time的值来自服务,它使用java.util.Date存储数据。时间戳中时间列的日期类型。。。