anchor.diff:  compile_select_col(DDL, {{window_agg_fn, FnName}, [FnArg1]}) when is_atom(FnName) ->
       case riak_ql_window_agg_fns:start_state(FnName) of
           stateless ->
  -            % TODO this does not run the function! nothing is stateless so far though
  +            %% TODO this does not run the function! nothing is stateless so far though
               Fn = compile_select_col_stateless(DDL, FnArg1),
               #single_sel_column{ calc_type        = rows,
                                   initial_state    = undefined,
  
positive.code:     {error, 'query is already compiled'};
  compile(#ddl_v1{}, ?SQL_SELECT{'SELECT' = #riak_sel_clause_v1{ clause = [] } }, _MaxSubQueries) ->
      {error, 'full table scan not implemented'};
  compile(#ddl_v1{} = DDL, ?SQL_SELECT{is_executable = false,
                                       type          = sql} = Q,
         MaxSubQueries) ->
      {ok, S} = compile_select_clause(DDL, Q),
      compile_where_clause(DDL, Q?SQL_SELECT{'SELECT' = S}, MaxSubQueries).
  
  %% adding the local key here is a bodge
  %% should be a helper fun in the generated DDL module but I couldn't
  
negative.code:           col_return_types :: [riak_pb_ts_codec:ldbvalue()],
            col_name         :: riak_pb_ts_codec:tscolumnname(),
            clause           :: function(),
            finaliser        :: [function()]
           }).
  
  