Github user MikkelTAndersen commented on the issue:

    https://github.com/apache/cassandra/pull/98
  
    Ahh sorry - it seems to complicated, its a simple null check - any chance
    you can add it Alex ? I have attached the patch.
    
    On Mon, Mar 13, 2017 at 1:38 PM, Alex Petrov <notificati...@github.com>
    wrote:
    
    > Hi @MikkelTAndersen <https://github.com/MikkelTAndersen>. Cassandra does
    > not use pull requests for Apache Cassandra. Please use JIRA directly.
    >
    > You can get more information on the contribution process here
    > https://wiki.apache.org/cassandra/HowToContribute
    >
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/cassandra/pull/98#issuecomment-286095410>, or 
mute
    > the thread
    > 
<https://github.com/notifications/unsubscribe-auth/AACsNo9UVdqa6Ygr4N2jwfUj-0ithzS7ks5rlTi8gaJpZM4MbArn>
    > .
    >
    
    
    
    -- 
    Venlig Hilsen
    Mikkel T. Andersen
    Skjoldborgvej 8
    7100 Vejle
    Mobil: +45 40 26 79 26
    
    From dac39d0268ba82b6be033e0c63ebd653ae0517cc Mon Sep 17 00:00:00 2001
    From: Mikkel Andersen <mikkel.t.ander...@gmail.com>
    Date: Mon, 13 Mar 2017 10:21:27 +0100
    Subject: [PATCH] added null check - see CASSANDRA-13246
    
    ---
     .../org/apache/cassandra/db/filter/RowFilter.java  | 22 
++++++++++++----------
     1 file changed, 12 insertions(+), 10 deletions(-)
    
    diff --git a/src/java/org/apache/cassandra/db/filter/RowFilter.java 
b/src/java/org/apache/cassandra/db/filter/RowFilter.java
    index bf65e96..c26c1ad 100644
    --- a/src/java/org/apache/cassandra/db/filter/RowFilter.java
    +++ b/src/java/org/apache/cassandra/db/filter/RowFilter.java
    @@ -611,17 +611,19 @@ public abstract class RowFilter implements 
Iterable<RowFilter.Expression>
                         if (column.isComplex())
                         {
                             ComplexColumnData complexData = 
row.getComplexColumnData(column);
    -                        for (Cell cell : complexData)
    -                        {
    -                            if (type.kind == CollectionType.Kind.SET)
    -                            {
    -                                if 
(type.nameComparator().compare(cell.path().get(0), value) == 0)
    -                                    return true;
    -                            }
    -                            else
    +                        if (complexData != null) {
    +                            for (Cell cell : complexData)
                                 {
    -                                if 
(type.valueComparator().compare(cell.value(), value) == 0)
    -                                    return true;
    +                                if (type.kind == CollectionType.Kind.SET)
    +                                {
    +                                    if 
(type.nameComparator().compare(cell.path().get(0), value) == 0)
    +                                        return true;
    +                                }
    +                                else
    +                                {
    +                                    if 
(type.valueComparator().compare(cell.value(), value) == 0)
    +                                        return true;
    +                                }
                                 }
                             }
                             return false;
    -- 
    2.0.1
    
    From 145087e3b5d748ce25e8792f91c249d2a05de3e5 Mon Sep 17 00:00:00 2001
    From: Mikkel Andersen <mikkel.t.ander...@gmail.com>
    Date: Mon, 13 Mar 2017 10:22:53 +0100
    Subject: [PATCH] fixed formatting
    
    ---
     src/java/org/apache/cassandra/db/filter/RowFilter.java | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/src/java/org/apache/cassandra/db/filter/RowFilter.java 
b/src/java/org/apache/cassandra/db/filter/RowFilter.java
    index c26c1ad..d3fc301 100644
    --- a/src/java/org/apache/cassandra/db/filter/RowFilter.java
    +++ b/src/java/org/apache/cassandra/db/filter/RowFilter.java
    @@ -611,7 +611,8 @@ public abstract class RowFilter implements 
Iterable<RowFilter.Expression>
                         if (column.isComplex())
                         {
                             ComplexColumnData complexData = 
row.getComplexColumnData(column);
    -                        if (complexData != null) {
    +                        if (complexData != null)
    +                        {
                                 for (Cell cell : complexData)
                                 {
                                     if (type.kind == CollectionType.Kind.SET)
    -- 
    2.0.1
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to