This is an automated email from the ASF dual-hosted git repository.

jcoglan pushed a commit to branch mango-match-failures
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 6f64ef37afabd8c61700cd8303ea0c3115ed1ad1
Author: James Coglan <[email protected]>
AuthorDate: Mon May 11 10:28:40 2026 +0100

    fix: The match/2 rule for filtering out <<>> should filter []
---
 src/mango/src/mango_selector.erl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mango/src/mango_selector.erl b/src/mango/src/mango_selector.erl
index e53820c4a..5d72ee581 100644
--- a/src/mango/src/mango_selector.erl
+++ b/src/mango/src/mango_selector.erl
@@ -399,13 +399,13 @@ match({[{<<"$all">>, _Args}]}, _Values, _Cmp) ->
 %% {[{<<"field_name">>,
 %%     {[{<<"$elemMatch">>,
 %%         {[{<<"$and">>, [
-%%             {[{<<>>,{[{<<"$gte">>,80}]}}]},
-%%             {[{<<>>,{[{<<"$lt">>,85}]}}]}
+%%             {[{[],{[{<<"$gte">>,80}]}}]},
+%%             {[{[],{[{<<"$lt">>,85}]}}]}
 %%         ]}]}
 %%     }]}
 %% }]}.
-%% So we filter out the <<>>.
-match({[{<<>>, Arg}]}, Values, Cmp) ->
+%% So we filter out the [].
+match({[{[], Arg}]}, Values, Cmp) ->
     match(Arg, Values, Cmp);
 % Matches when any element in values matches the
 % sub-selector Arg.

Reply via email to