anchor.diff:      Res = riak_kv_ddl:is_query_valid(DDL, Query),
       ?assertEqual(true, Res).
   
  +%%
  +%% Tests for queries with non-null filters
  +%%
  +simple_filter_query_test() ->
  +    Bucket = <<"simple_filter_query_test">>,
  +    Selections  = [["temperature"], ["geohash"]],
  +    Filters = [{and_, {'>', "temperature", 1}, {'<', "temperature", 15}}],
  +    Query = #riak_kv_li_index_v1{bucket     = Bucket,
  +				 selections = Selections,
  +				 filters    = Filters},
  +    DDL = make_ddl(Bucket,
  +		    [
  +		     #riak_field_v1{name     = "temperature",
  +				    position = 1,
  +				    type     = integer},
  +		     #riak_field_v1{name     = "geohash",
  +				    position = 2,
  +				    type     = integer}
  +		    ]),
  +    {module, _ModName} = riak_kv_ddl_compiler:make_helper_mod(DDL),
  +    Res = riak_kv_ddl:is_query_valid(DDL, Query),
  +    ?assertEqual(true, Res).
  +
  +simple_filter_query_fail_test() ->
  +    Bucket = <<"simple_filter_query_fail_test">>,
  +    Selections  = [["temperature"], ["geohash"]],
  +    Filters = [{and_, {'>', "gingerbread", 1}, {'<', "temperature", 15}}],
  +    Query = #riak_kv_li_index_v1{bucket     = Bucket,
  +				 selections = Selections,
  +				 filters    = Filters},
  +    DDL = make_ddl(Bucket,
  +		    [
  +		     #riak_field_v1{name     = "temperature",
  +				    position = 1,
  +				    type     = integer},
  +		     #riak_field_v1{name     = "geohash",
  +				    position = 2,
  +				    type     = integer}
  +		    ]),
  +    {module, _ModName} = riak_kv_ddl_compiler:make_helper_mod(DDL),
  +    Res = riak_kv_ddl:is_query_valid(DDL, Query),
  +    Expected = {false, [
  +			{are_selections_valid, true},
  +			{are_filters_valid, {false, [{invalid_field, ["gingerbread"]}]}}
  +			]
  +	       },
  +    ?assertEqual(Expected, Res).
  +
   -endif.
  
positive.code: 				    position = 2,
  				    type     = integer}
  		    ]),
      {module, _Module} = riak_kv_ddl_compiler:make_helper_mod(DDL),
      Res = are_selections_valid(DDL, Selections, ?CANTBEBLANK),
      ?assertEqual(true, Res).
  
  
negative.code:     Res = riak_kv_ddl:is_query_valid(DDL, Query),
      ?assertEqual(true, Res).
  
  simple_is_query_valid_fail_test() ->
      Bucket = <<"simple_is_query_valid_fail_test">>,
      Selections  = [["temperature"], ["yerble"]],
      Query = #riak_kv_li_index_v1{bucket     = Bucket,
  				 selections = Selections},
      DDL = make_ddl(Bucket,
  		    [
  		     #riak_field_v1{name     = "temperature",
  