You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Pierre (JIRA)" <ji...@apache.org> on 2015/02/21 14:23:11 UTC

[jira] [Created] (CASSANDRA-8845) sorted CQLSSTableWriter accept unsorted clustering keys

Pierre created CASSANDRA-8845:
---------------------------------

             Summary: 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
         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)