When executing a query created with RelBuilder.values() that includes a projection, it will fail if it has been executed after another query which accesses an underlying data store (in this case, the SCOTT HSQL database).
Interesting, if you first perform the values query, then access the data store, and then perform the values query again, it works fine. It seems like in this case, the query is executed directly in-memory.
The test case pasted below fails with the exception:
However, it only fails when run individually with:
mvn test -pl core -Dtest=RelBuilderBugTest
When run as part of the entire test suite, it passes, making one suspect that there might be some global state issue at play.