There might be an alternative.
You could create a "dummy" column that are set to one or zero during insertion if a threshold is exceed. Then, create a composite column index like so:
CREATE TABLE mdefparts (
part int,
name text,
val double,
time timeuuid,
exceeded boolean,
PRIMARY KEY ((part, name), exceeded, time)
);
This would work like so:
cqlsh:test> CREATE TABLE mdefparts (
... part int,
... name text,
... val double,
... time timeuuid,
... exceeded boolean,
... PRIMARY KEY ((part, name), exceeded, time)
... );
cqlsh:test>
cqlsh:test> insert into mdefparts (part, name, val, time, exceeded) values (0, 'y', 100, 37a5de5c-efb3-11e2-99d0-f23c91aec05e, true);
cqlsh:test> insert into mdefparts (part, name, val, time, exceeded) values (0, 'x', 100, 37a5de6c-efb3-11e2-99d0-f23c91aec05e, true);
cqlsh:test> insert into mdefparts (part, name, val, time, exceeded) values (0, 'y', 10, 37a5de7c-efb3-11e2-99d0-f23c91aec05e, false);
cqlsh:test> insert into mdefparts (part, name, val, time, exceeded) values (1, 'y', 1, 37a5de8c-efb3-11e2-99d0-f23c91aec05e, false);
cqlsh:test> select * from mdefparts;
part | name | exceeded | time | val
------+------+----------+--------------------------------------+-----
0 | y | False | 37a5de7c-efb3-11e2-99d0-f23c91aec05e | 10
0 | y | True | 37a5de5c-efb3-11e2-99d0-f23c91aec05e | 100
1 | y | False | 37a5de8c-efb3-11e2-99d0-f23c91aec05e | 1
0 | x | True | 37a5de6c-efb3-11e2-99d0-f23c91aec05e | 100
cqlsh:test> select * from mdefparts where name in ('x','y') and part = 0 and exceeded = true;
part | name | exceeded | time | val
------+------+----------+--------------------------------------+-----
0 | x | True | 37a5de6c-efb3-11e2-99d0-f23c91aec05e | 100
0 | y | True | 37a5de5c-efb3-11e2-99d0-f23c91aec05e | 100
The core idea here was here to model the query into the column family. I added a timeuuid to allow multiple measurements over time.