Skip to content

Commit

Permalink
Allow protobuffs interface to understand key filters when using Erlang
Browse files Browse the repository at this point in the history
terms as the query format. Fixes bz://964.
  • Loading branch information
seancribbs committed Jan 5, 2011
1 parent 0c6dc2d commit 949b850
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/riak_kv_mapred_term.erl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ parse_request(BinReq) ->
%% Return ok if inputs are valid, {error, Reason} if not
%% @type mapred_inputs() = [bucket_key()]
%% |bucket()
%% |{bucket(), list()}
%% |{modfun, atom(), atom(), list()}
valid_inputs(Bucket) when is_binary(Bucket) ->
ok;
Expand All @@ -66,8 +67,10 @@ valid_inputs(Targets) when is_list(Targets) ->
valid_inputs({modfun, Module, Function, _Options})
when is_atom(Module), is_atom(Function) ->
ok;
valid_inputs({Bucket, Filters}) when is_binary(Bucket), is_list(Filters) ->
ok;
valid_inputs(Invalid) ->
{error, {"Inputs must be a binary bucket, a list of target tuples, or a modfun tuple:", Invalid}}.
{error, {"Inputs must be a binary bucket, a tuple of bucket and key-filters, a list of target tuples, or a modfun tuple:", Invalid}}.

%% @type bucket_key() = {binary(), binary()}
%% |{{binary(), binary()}, term()}
Expand Down

0 comments on commit 949b850

Please sign in to comment.