anchor.diff:      end;
   check_where_clause_is_possible_fold(_, _, {'<',{field,FieldName,_},{const,LtVal}} = F, Acc) ->
       case find_filter_check(FieldName, Acc) of
  +        #filtercheck{'<' = F} ->
  +            %% duplicate < filter
  +            {eliminate, Acc};
           #filtercheck{'=' = {_,_,{const,EqVal}}} when LtVal > EqVal ->
               %% existing equality check is less than than this less than filter,
               %% so this filter is already included so it can be eliminated
  
positive.code:         S?SQL_SELECT.'WHERE'
      ).
  
  
  -endif.
  
negative.code:         S?SQL_SELECT.'WHERE'
      ).
  
  less_than_duplicates_are_eliminated_test() ->
      DDL = get_ddl(
          "CREATE TABLE table1("
          "a TIMESTAMP NOT NULL, "
          "b SINT64 NOT NULL, "
          "PRIMARY KEY ((a),a))"),
      {ok, Q} = get_query(
          "SELECT * FROM table1 "
          "WHERE a = 5 AND b < 10 AND b < 10"),
      {ok, [S|_]} = compile(DDL, Q),
      ?assertPropsEqual(
          [{startkey,[{<<"a">>,timestamp,5}]},
           {endkey,  [{<<"a">>,timestamp,5}]},
           {filter, {'<',{field,<<"b">>,sint64},{const,10}}},
           {end_inclusive,true}],
          S?SQL_SELECT.'WHERE'
      ).
  
  query_impossible_if_less_than_is_equal_to_equality_filter_on_same_column_test() ->
      DDL = get_ddl(
          "CREATE TABLE table1("
  