anchor.diff:              {ok, Res}
       end.
   
  -glob_prefix([], Prefix) ->
  -    dproto:metric_from_list(lists:reverse(Prefix));
  -glob_prefix(['*' |_], Prefix) ->
  -    dproto:metric_from_list(lists:reverse(Prefix));
  -glob_prefix([E | R], Prefix) ->
  -    glob_prefix(R, [E | Prefix]).
  -
   
   
   rmatch(['*' | Rm], <<_S:?METRIC_ELEMENT_SS/?SIZE_TYPE, _:_S/binary, Rb/binary>>) ->
  
positive.code:     needs_buckets(Comb, Buckets);
  
  needs_buckets({calc, _Steps, {sget, {Bucket, Glob}}}, Buckets) ->
      orddict:append(Bucket, glob_prefix(Glob, []), Buckets);
  
  needs_buckets({calc, _Steps, {get, _}}, Buckets) ->
      Buckets;
  
negative.code:     case dql:prepare(Query) of
          {ok, {Parts, Start, Count, _Res, Aliases, _SomethingElse}} ->
              Buckets = needs_buckets(Parts, []),
              Buckets1 = [begin
                              {ok, BMs} = dqe_idx:expand(B, Gs),
                              BMs
                          end || {B, Gs} <- Buckets],
              Parts1 = expand_parts(Parts, Buckets1),
              case name_parts(Parts1, [], Aliases, Buckets1) of
                  {ok, Parts2} ->
                      {ok, {Parts2, Start, Count}};
                  E ->
  