【发布时间】:2018-06-27 18:37:30
【问题描述】:
我在 cassandra 中有下表:
create table IF NOT EXISTS sample_table(
col1 int,
col2 int,
col3 int,
primary key(col1,col2)
);
上表目前有 640 行。 以下查询查找令牌:
select system.token(col1),col1,col2,col3 from sample_table;
执行时,通知所有行位于 -9157060164899361011 到 9162265122815852158 令牌之间。
现在,这显然意味着没有 -9223372036854775808 令牌的记录。
但是,当我执行下面的查询时
select system.token(col1),col1,col2,col3 from sample_table
where token(col1)=-9223372036854775808;
它给出所有 640 行作为答案,即使返回的行都没有标记为 -9223372036854775808。
对 -9223372036854775807 令牌执行相同的查询,完全不返回正确的记录。
我发现,这种奇怪的行为仅适用于 -9223372036854775808 令牌。
我正在使用 murmur3partitioner。
如果有人知道这背后的原因,请解释一下。
【问题讨论】:
-
你从哪里得到这个号码的?