@Override
    public Set<?> values() {
      throw new UnsupportedOperationException("Expression can not be optimized for key lookup." +
              " Did you check isOptimizable() method ? ");
    }
Result when optimization is not possible
criteria/geode/src/org/immutables/criteria/geode/KeyLookupAnalyzer.java