Consider the following query.
db.select().from(employee).where(employee.hireDate.isNull());
Even if an index exists for the hireDate column, the index is not being used. The culprit seems to be at ValuePredicate#isKeyRangeCompatible, which explicitly checks for null. Maybe this is a left-over from when within SingleKeyRange null was a special value meaning "unbound". Need to verify if latest SingleKeyRange version can express the [null, null] range.
Consider the following query. db.select().from(employee).where(employee.hireDate.isNull());
Even if an index exists for the hireDate column, the index is not being used. The culprit seems to be at ValuePredicate#isKeyRangeCompatible, which explicitly checks for null. Maybe this is a left-over from when within SingleKeyRange null was a special value meaning "unbound". Need to verify if latest SingleKeyRange version can express the [null, null] range.