You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2018/06/18 17:35:57 UTC
[couchdb] branch add-sort-from-selector updated (7f2ebca -> f5b3156)
This is an automated email from the ASF dual-hosted git repository.
garren pushed a change to branch add-sort-from-selector
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
discard 7f2ebca Improvements
discard 2dde5c7 add a few more tests
discard acfed99 Add fields to sort based on selector
add 8a46473 Add hyper app to dependencies
add 0392c51 Finalize in couch_mrview, but make it optional
add 5fa3c43 Use finalize operation to simplify _stats
add 398ac18 Ignore trailing characters in a builtin reduce
add 62f71c0 Fix container for package-building step
add 994b370 Jenkinsfile: typo
add 71c33b1 Update skip_deps for 3rd parties eunit (#1386)
add 2bf04a0 Revert "Introduce bin_opt_info erl_opts compilation option"
add 76790d5 Add compile's command line options
add 2fe402f Remove debug_info from compile options
add dfa8780 Make bin_opt_info optional based on env variable
add 41decfa Allow custom compile options with env variable
add c7d35c3 Merge pull request #1387 from cloudant/make-bin_opt_info-optional
add 000766c Fix active size calculations for views
add aebdbc4 Optimize couch_key_tree:stem/2
add 3c98385 Fix couch_key_tree_tests.erl
add a4655b0 Add fields to sort based on selector
add 474c81f add a few more tests
add 65d4d95 Improvements
add de8c6e1 Move sort filtering into is_usable
new f5b3156 code clean up
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (7f2ebca)
\
N -- N -- N refs/heads/add-sort-from-selector (f5b3156)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Jenkinsfile | 4 +-
Makefile | 13 +--
rebar.config.script | 7 +-
src/couch/src/couch.app.src | 3 +-
src/couch/src/couch_db.erl | 10 +--
src/couch/src/couch_db_updater.erl | 33 ++++----
src/couch/src/couch_key_tree.erl | 74 +++++++++++++++++
src/couch/src/couch_query_servers.erl | 31 +++----
src/couch/test/couch_key_tree_tests.erl | 24 ++++--
src/couch_mrview/src/couch_mrview.erl | 28 +++++--
src/couch_mrview/src/couch_mrview_index.erl | 3 +-
src/couch_mrview/src/couch_mrview_util.erl | 17 ++++
.../test/couch_mrview_index_info_tests.erl | 96 ++++++++++++++++------
src/fabric/src/fabric_rpc.erl | 5 +-
src/fabric/src/fabric_view.erl | 2 +-
src/mango/src/mango_cursor.erl | 18 ++--
src/mango/src/mango_idx.erl | 27 ++----
src/mango/src/mango_idx_special.erl | 16 ++--
src/mango/src/mango_idx_text.erl | 13 +--
src/mango/src/mango_idx_view.erl | 15 ++--
src/mango/test/18-json-sort.py | 14 ++++
src/mango/test/mango.py | 1 +
22 files changed, 310 insertions(+), 144 deletions(-)
--
To stop receiving notification emails like this one, please contact
garren@apache.org.
[couchdb] 01/01: code clean up
Posted by ga...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
garren pushed a commit to branch add-sort-from-selector
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit f5b3156766dfc5cad3a8cba3547d8ac5b0238f1e
Author: Garren Smith <ga...@gmail.com>
AuthorDate: Mon Jun 18 19:34:56 2018 +0200
code clean up
---
src/mango/src/mango_idx.erl | 4 ++--
src/mango/src/mango_idx_special.erl | 15 ++++-----------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/mango/src/mango_idx.erl b/src/mango/src/mango_idx.erl
index 211edac..8af92b9 100644
--- a/src/mango/src/mango_idx.erl
+++ b/src/mango/src/mango_idx.erl
@@ -70,8 +70,8 @@ get_usable_indexes(Db, Selector, Opts) ->
case lists:filter(UsableFilter, UsableIndexes0) of
[] ->
?MANGO_ERROR({no_usable_index, missing_sort_index});
- UsableIndexes1 ->
- UsableIndexes1
+ UsableIndexes ->
+ UsableIndexes
end.
diff --git a/src/mango/src/mango_idx_special.erl b/src/mango/src/mango_idx_special.erl
index aa1ec2f..ac6efc7 100644
--- a/src/mango/src/mango_idx_special.erl
+++ b/src/mango/src/mango_idx_special.erl
@@ -22,9 +22,7 @@
columns/1,
is_usable/3,
start_key/1,
- end_key/1,
-
- maybe_filter_by_sort_fields/3
+ end_key/1
]).
@@ -69,7 +67,7 @@ is_usable(#idx{def=all_docs}, _Selector, []) ->
true;
is_usable(#idx{def=all_docs} = Idx, Selector, SortFields) ->
Fields = mango_idx_view:indexable_fields(Selector),
- lists:member(<<"_id">>, Fields) and maybe_filter_by_sort_fields(Idx, SortFields, Selector).
+ lists:member(<<"_id">>, Fields) and can_use_sort(Idx, SortFields, Selector).
start_key([{'$gt', Key, _, _}]) ->
@@ -102,13 +100,8 @@ end_key([{'$eq', Key, '$eq', Key}]) ->
Key.
-% maybe_filter_by_sort_fields(Idx, SortFields, Selector) ->
-% Cols = columns(Idx),
-% io:format("HERE BOOM ~p ~n ~p ~n", [Idx, Cols]),
-% lists:prefix(SortFields, Cols).
-
-maybe_filter_by_sort_fields(_Idx, [], _Selector) ->
+can_use_sort(_Idx, [], _Selector) ->
true;
-maybe_filter_by_sort_fields(Idx, SortFields, _Selector) ->
+can_use_sort(Idx, SortFields, _Selector) ->
Cols = columns(Idx),
lists:prefix(SortFields, Cols).
--
To stop receiving notification emails like this one, please contact
garren@apache.org.