anchor.diff:                                    {ok, [?SQL_SELECT{}]} | {error, term()}.
   compile_where_clause(?DDL{} = DDL,
                        ?SQL_SELECT{is_executable = false,
  -                                 'WHERE'       = W,
  +                                 'WHERE'       = W1,
                                    cover_context = Cover} = Q) ->
  -    case {compile_where(DDL, W), unwrap_cover(Cover)} of
  +    {W2,_} = resolve_expressions(W1),
  +    case {compile_where(DDL, [W2]), unwrap_cover(Cover)} of
           {{error, E}, _} ->
               {error, E};
           {_, {error, E}} ->
  
positive.code: modify_where_key(TupleList, Field, NewVal) ->
      {Field, FieldType, _OldVal} = lists:keyfind(Field, 1, TupleList),
      lists:keyreplace(Field, 1, TupleList, {Field, FieldType, NewVal}).
  
  -record(filtercheck, {name,'=','>','>=','<','<='}).
  
  
negative.code:         [W || ?SQL_SELECT{'WHERE' = W} <- SubQueries]
      ).
  
  query_with_arithmetic_in_where_clause_test() ->
      DDL = get_ddl(
          "CREATE table table1 ("
          "a VARCHAR NOT NULL,"
          "b TIMESTAMP NOT NULL,"
          "PRIMARY KEY ((a, b), a, b));"
      ),
      {ok, Q} = get_query(
            "SELECT * FROM table1 WHERE a = 'hi' AND b = 4000 + 1s"),
      {ok, SubQueries} = compile(DDL, Q),
      ?assertEqual(
          [[{startkey,[{<<"a">>,varchar,<<"hi">>},{<<"b">>,timestamp,5000}]},
            {endkey,  [{<<"a">>,varchar,<<"hi">>},{<<"b">>,timestamp,5000}]},
            {filter,[]},
            {end_inclusive, true}]],
          [W || ?SQL_SELECT{'WHERE' = W} <- SubQueries]
      ).
  
  -endif.
  