cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: Lists: only fetch cell path if you have a valid value to add patch by dbrosius, reviewed by rstupp for CASSANDRA-10941
Date Sun, 27 Dec 2015 20:19:16 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 4675b2089 -> 6bd0f7ac1


Lists: only fetch cell path if you have a valid value to add
patch by dbrosius, reviewed by rstupp for CASSANDRA-10941


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6bd0f7ac
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6bd0f7ac
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6bd0f7ac

Branch: refs/heads/trunk
Commit: 6bd0f7ac1037f7171291e2a8a92d9b013b1a5626
Parents: 4675b20
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Sun Dec 27 15:17:09 2015 -0500
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Sun Dec 27 15:17:09 2015 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/cql3/Lists.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6bd0f7ac/src/java/org/apache/cassandra/cql3/Lists.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Lists.java b/src/java/org/apache/cassandra/cql3/Lists.java
index 4b41a9d..43a97ae 100644
--- a/src/java/org/apache/cassandra/cql3/Lists.java
+++ b/src/java/org/apache/cassandra/cql3/Lists.java
@@ -356,13 +356,13 @@ public abstract class Lists
             if (idx < 0 || idx >= existingSize)
                 throw new InvalidRequestException(String.format("List index %d out of bound,
list has size %d", idx, existingSize));
 
-            CellPath elementPath = existingRow.getComplexColumnData(column).getCellByIndex(idx).path();
             if (value == null)
             {
                 params.addTombstone(column);
             }
             else if (value != ByteBufferUtil.UNSET_BYTE_BUFFER)
             {
+                CellPath elementPath = existingRow.getComplexColumnData(column).getCellByIndex(idx).path();
                 params.addCell(column, elementPath, value);
             }
         }


Mime
View raw message