cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-5600) fix intersection-checking in CompositeType
Date Thu, 30 May 2013 20:18:20 GMT


Sylvain Lebresne commented on CASSANDRA-5600:

The changes look good. However, the methods in ColumnNameHelper basically assume that all
column names (for a given CF) will have the same number of components. But that's not true
(it's not true for CQL3 because of collections, but more importantly, since CompositeType
doesn't force all components to be set, thrift users may have existing CF where the column
names differ widely in number of components). So I believe we should have something along
the lines of
List<ByteBuffer> components = Arrays.asList(ct.split(candidate));
int minSize = Math.min(maxSeen.size(), components.size());
for (int i = 0; i < minSize; i++)
    retList.add(ColumnNameHelper.max(maxSeen.get(i), components.get(i), ct.types.get(i)));

List<ByteBuffer> biggest = maxSeen().size() > components().size() ? maxSeen : components;
for (int i = minSize; i < biggest.size(); i++)

Nit: In CompositeType.intersects, could be worth asserting is that minColumnNames.size() ==
maxColumnNames.size() (since the method does assume it). It's reasonable in that case since
both are guaranteed to be the size of the longest column name in the sstable.

> fix intersection-checking in CompositeType
> ------------------------------------------
>                 Key: CASSANDRA-5600
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>         Attachments: 0001-CASSANDRA-5600-v1.patch
> CASSANDRA-5514 introduced the ability to skip entire sstables based on max/min column
names in the sstable. This ticket aims to fix a few issues with it:
> * dont use ACT.deconstruct on the hot path
> * remove assert that compares type count with collected columns

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message