couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbast...@apache.org
Subject [39/41] couch-mrview commit: updated refs/heads/master to 28e51f3
Date Fri, 31 Oct 2014 19:53:54 GMT
fix removal of duplicate keys from seq tree


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/11d4c17e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/11d4c17e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/11d4c17e

Branch: refs/heads/master
Commit: 11d4c17e4ca729832396d8b393b8c0b95bad7bc0
Parents: 2e0be35
Author: Benjamin Bastian <benjamin.bastian@gmail.com>
Authored: Tue Sep 16 12:52:54 2014 -0700
Committer: Benjamin Bastian <benjamin.bastian@gmail.com>
Committed: Thu Oct 30 19:28:42 2014 -0700

----------------------------------------------------------------------
 src/couch_mrview_updater.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/11d4c17e/src/couch_mrview_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_updater.erl b/src/couch_mrview_updater.erl
index b7f91e1..c98c2f5 100644
--- a/src/couch_mrview_updater.erl
+++ b/src/couch_mrview_updater.erl
@@ -273,8 +273,8 @@ merge_results({DocId, _Seq, Rev, []}, ViewKVs, DocIdKeys, Log) ->
 merge_results({DocId, Seq, Rev, RawResults}, ViewKVs, DocIdKeys, Log) ->
     JsonResults = couch_query_servers:raw_to_ejson(RawResults),
     Results = [[list_to_tuple(Res) || Res <- FunRs] || FunRs <- JsonResults],
-    case Results of
-        [[],[]] ->
+    case lists:flatten(Results) of
+        [] ->
             {ViewKVs, [{DocId, []} | DocIdKeys], dict:store({DocId, Rev}, [], Log)};
         _ ->
             {ViewKVs1, ViewIdKeys, Log1} = insert_results(DocId, Seq, Rev, Results, ViewKVs,
[], [], Log),


Mime
View raw message