[
https://issues.apache.org/jira/browse/CASSANDRA-6644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887683#comment-13887683
]
Sylvain Lebresne commented on CASSANDRA-6644:
---------------------------------------------
bq. What I'm proposing is a way to instruct the server how to "move the cursor"
when reading a wide row.
I'm not really sure what you have in mind here, there is no "cursor" so to
speak in Cassandra's implementation so if have implementation details in mind,
you may have to be a bit more precise.
But if what you're hinting at is something like pushing such skipping down in
the storage engine so that the skip is done closer to reading the disk, then
well, that just doesn't work because there is no guarantees that skipping every
n-th row on every replica will be correct once replica results have been merged
on the coordinator. It follows that the only way to properly do what you've
described above (as far as I can tell at least) is to filter one every nth row
in the coordinator, after replica results have been resolved. Which in turns is
*exactly* what CASSANDRA-4914 is about.
> CQL: Select every nth row within the same partition key
> -------------------------------------------------------
>
> Key: CASSANDRA-6644
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6644
> Project: Cassandra
> Issue Type: Wish
> Reporter: Jorge Bay
>
> In a time-series schema (like metrics), it is common to create
> roollups/buckets with datapoints at different rate.
> It would be nice to have a keyword in CQL to be able to retrieve one every
> nth row (within a single storage engine wide row).
> For example, in the following schema:
> CREATE TABLE metrics (
> ... metric_id varchar,
> ... ts timestamp,
> ... value float,
> ... PRIMARY KEY (metric_id, ts)
> ... );
> The following query, will retrieve 1 in every 3 rows:
> (SKIP keyword or something like that, but don't focus on the syntax)
> SELECT ts, value WHERE metric_id = ? SKIP 2;
> This would be very useful for continuous (and somehow linear) metrics.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)