[ 
https://issues.apache.org/jira/browse/CASSANDRA-7279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14006885#comment-14006885
 ] 

Edward Capriolo commented on CASSANDRA-7279:
--------------------------------------------

Two questions:

In removeOverlappingSlices, what is the rational for not doing anything when we 
have no comparator? Is there ever a time when we do not have a comparator? I 
would assume no comparator BytesType. 
{code}
 if (comparator == null || slices.length <= 1)
+            return slices;
{code}

This is a test with bad input:
{code}
    @Test
    public void testBadStuff() throws CharacterCodingException
    {
      ColumnSlice aToE = new ColumnSlice(cellname("a"), cellname("e"));
      ColumnSlice dToG = new ColumnSlice(cellname("g"), cellname("d"));
      CellNameType c = new SimpleDenseCellNameType(UTF8Type.instance);
      ColumnSlice [] result =   SliceQueryFilter.removeOverlappingSlices(new 
ColumnSlice[]{ dToG, aToE }, true, c );
      Assert.assertEquals(1, result.length);
      Assert.assertEquals("g", ByteBufferUtil.string(result[0].start.get(0)));
      Assert.assertEquals("a", ByteBufferUtil.string(result[0].finish.get(0)));
    }
{code}

junit.framework.ComparisonFailure: null expected:<[a]> but was:<[d]>

Maybe it is redundant checking, but should we explode more violently in these 
cases? Like the case above is it better to fail hard then return something 
undefined?

> MultiSliceTest.test_with_overlap* unit tests failing in trunk
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-7279
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Michael Shuler
>            Assignee: T Jake Luciani
>            Priority: Minor
>             Fix For: 2.1 rc1
>
>         Attachments: 7279-trunk.txt, 7279-trunkv2.txt
>
>
> Example:
> https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to