Thomas,

I have a question about BaseIndex.compareValues method.
It contains the following lines:

        boolean aNull = a == null, bNull = b == null;
        if (aNull || bNull) {
            return SortOrder.compareNull(aNull, sortType);
        }

As far as I understand, value can be null only in a SearchRow when it has 
an open bound, for data row it always must be ValueNull.INSTANCE, no?
Is this comparison correct? May be it must be something like aNull = a == 
ValueNull.INSTANCE, bNull = b == ValueNull.INSTANCE?

I was not able to exploit this thing in H2 but I have a problem with my 
Index implementation because of this.
At some point I need to check if the lower bound search row is not greater 
than upper bound search row (which means we need to return empty result), 
and if query condition contains an open bound (null in a search row) then 
result of this comparison depends on null sorting settings of the database.

Could you please comment on this?

Sergi

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to