anchor.diff:  
   prepare_final_results_test() ->
       Rows = [[12, <<"windy">>], [13, <<"windy">>]],
  -    IndexedChunks = [{1, Rows}],
  +    % IndexedChunks = [{1, Rows}],
       ?assertEqual(
           {[<<"a">>, <<"b">>], [sint64, varchar], Rows},
           prepare_final_results(
  -            #riak_sel_clause_v1{
  -                col_names = [<<"a">>, <<"b">>],
  -                col_return_types = [sint64, varchar],
  -                calc_type = rows }, IndexedChunks)
  +            #state{
  +                qry =
  +                    ?SQL_SELECT{
  +                        'SELECT' = #riak_sel_clause_v1{
  +                            col_names = [<<"a">>, <<"b">>],
  +                            col_return_types = [sint64, varchar],
  +                            calc_type = rows
  +                         }
  +                    },
  +                result = [{1, Rows}]})
       ).
   
   -endif.
  
positive.code:             State
      end.
  
  -spec prepare_final_results(#riak_sel_clause_v1{}, [{non_neg_integer(), list()}]) ->
                                     {[riak_pb_ts_codec:tscolumnname()],
                                      [riak_pb_ts_codec:tscolumntype()],
                                      [[riak_pb_ts_codec:ldbvalue()]]}.
  prepare_final_results(#riak_sel_clause_v1{calc_type = rows} = Select,
                        IndexedChunks) ->
      %% sort by index, to reassemble according to coverage plan
      {_, R2} = lists:unzip(lists:sort(IndexedChunks)),
      prepare_final_results2(Select, lists:append(R2));
  prepare_final_results(#riak_sel_clause_v1{ calc_type = aggregate } = Select,
                        Aggregate1) ->
      Aggregate2 = riak_kv_qry_compiler:finalise_aggregate(Select, Aggregate1),
      prepare_final_results2(Select, [Aggregate2]).
  
  %%
  prepare_final_results2(#riak_sel_clause_v1{ col_return_types = ColTypes,
  
negative.code: subqueries_done(QId,
                  #state{qid          = QId,
                         receiver_pid = ReceiverPid,
                         sub_qrys     = SubQQ} = State) ->
      case SubQQ of
          [] ->
              QueryResult2 = prepare_final_results(State),
              %   send the results to the waiting client process
              ReceiverPid ! {ok, QueryResult2},
              pop_next_query(),
  