incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/3] git commit: Cleaning up some code
Date Sun, 15 Sep 2013 01:44:17 GMT
Updated Branches:
  refs/heads/master 32947c7b4 -> 0ddae7ad0


Cleaning up some code


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/f76fa04d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/f76fa04d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/f76fa04d

Branch: refs/heads/master
Commit: f76fa04daf94b9ba979e0e4c43e7ba9e5b677a26
Parents: 32947c7
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat Sep 14 20:55:04 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat Sep 14 20:55:04 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/manager/IndexManager.java  | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f76fa04d/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index 37b4393..45b62d1 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -1027,6 +1027,9 @@ public class IndexManager {
       return;
     case APPEND_COLUMN_VALUES:
       for (Column column : mutationRecord.columns) {
+        if (column.getValue() == null) {
+          continue;
+        }
         existingRecord.addToColumns(column);
       }
       newRow.addToRecords(existingRecord);
@@ -1035,18 +1038,17 @@ public class IndexManager {
       newRow.addToRecords(mutationRecord);
       break;
     case REPLACE_COLUMNS:
-      Set<String> columnNames = new HashSet<String>();
-      for (Column column : mutationRecord.columns) {
-        columnNames.add(column.name);
+      Set<String> removeColumnNames = new HashSet<String>();
+      for (Column column : mutationRecord.getColumns()) {
+        removeColumnNames.add(column.getName());
       }
 
-      LOOP: for (Column column : existingRecord.columns) {
+      for (Column column : existingRecord.getColumns()) {
         // skip columns in existing record that are contained in the mutation
         // record
-        if (columnNames.contains(column.name)) {
-          continue LOOP;
+        if (!removeColumnNames.contains(column.getName())) {
+          mutationRecord.addToColumns(column);
         }
-        mutationRecord.addToColumns(column);
       }
       newRow.addToRecords(mutationRecord);
       break;


Mime
View raw message