On Wed, Mar 30, 2011 at 1:35 AM, Emmanuel Lecharny <elecharny@gmail.com> wrote:
Hi guys,

I'm facing an interesting issue. When we parse a filter, we build a Value which is a BinaryValue, even if the attribute is H/R. The problem is that we have to provide a getString() method which translates this byte[] when we want to process the Value.

I tried to get rid of the getString() method in the StringValue class and getBytes() in BinaryValue, but I can't because of the above issue.

Now, I'm wondering if it wouldn't be better to store a StringValue() when we parse a Filter, as a default value, excpet if the Filter is schema aware (which is not currently the case).

Most of the time ad hoc filters are string based. However we have seen situations where they will be binary as well. As long as we're interchangeable there should be no problem and since the binary case is the exception then it makes sense using string values.

How we do this however is important since this impacts virtually everything in the server.