anchor.diff:  modify_where_key(TupleList, Field, NewVal) ->
       {Field, FieldType, _OldVal} = lists:keyfind(Field, 1, TupleList),
       lists:keyreplace(Field, 1, TupleList, {Field, FieldType, NewVal}).
  --include_lib("eunit/include/eunit.hrl").
   
   check_where_clause_is_possible(DDL, WhereProps) ->
  -    ?debugFmt("WHERE PROPS ~p", [WhereProps]),
       Filter1 = proplists:get_value(filter, WhereProps),
       {Filter2, _} = riak_ql_ddl:mapfold_where_tree(
           fun (_, and_, Acc) ->
  
positive.code:         false ->
              {eliminate, Acc}
      end;
  check_where_clause_is_possible_fold(_, _Conditional, _Filter, _Acc) ->
      ok.
  
  is_field_nullable(FieldName, ?DDL{fields = Fields}) when is_binary(FieldName)->
      #riak_field_v1{optional = Optional} = lists:keyfind(FieldName, #riak_field_v1.name, Fields),
  
negative.code:             (_, or_, Acc) ->
                  {skip, Acc};
              (Conditional, Filter, Acc) ->
                  check_where_clause_is_possible_fold(DDL, Conditional, Filter, Acc)
          end, [], Filter1),
      lists:keystore(filter, 1, WhereProps, {filter,Filter2}).
  
  