[
https://issues.apache.org/jira/browse/CASSANDRA-8845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14368609#comment-14368609
]
Pierre N. commented on CASSANDRA-8845:
--------------------------------------
Yes that's what I'm saying, if it's the desired behavior, just javadoc should
be updated and there is no bug.
> sorted CQLSSTableWriter accept unsorted clustering keys
> -------------------------------------------------------
>
> Key: CASSANDRA-8845
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8845
> Project: Cassandra
> Issue Type: Bug
> Reporter: Pierre N.
> Fix For: 2.1.4
>
> Attachments: TestSorted.java
>
>
> The javadoc says :
> {quote}
> The SSTable sorted order means that rows are added such that their partition
> key respect the partitioner order and for a given partition, that *the rows
> respect the clustering columns order*.
> public Builder sorted()
> {quote}
> It throw an ex when partition key are in incorrect order, however, it doesn't
> throw an ex when rows are inserted with incorrect clustering keys order. It
> buffer them and sort them in correct order.
> {code}
> writer.addRow(1, 3);
> writer.addRow(1, 1);
> writer.addRow(1, 2);
> {code}
> {code}
> $ sstable2json sorted/ks/t1/ks-t1-ka-1-Data.db
> [
> {"key": "1",
> "cells": [["\u0000\u0000\u0000\u0001:","",1424524149557000],
> ["\u0000\u0000\u0000\u0002:","",1424524149557000],
> ["\u0000\u0000\u0000\u0003:","",1424524149550000]]}
> ]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)