rzo1 commented on PR #178:
URL: https://github.com/apache/openjpa/pull/178#issuecomment-5529546219

   Added tests for two of the three, in `TestInMemoryScalarExpressions` — both 
force the in-memory executor by supplying a candidate collection, and both fail 
against the unchanged kernel:
   
   - `testNullPrecedenceInMemory` — all four combinations of ASC/DESC with 
NULLS FIRST/LAST. Two of them were already correct by accident, the other two 
were silently wrong.
   - `testSetOperationInMemoryIsRejected` — asserts the message actually says 
the query cannot be evaluated in memory. My first version of this assertion 
passed against master, because the query failed there anyway with a 
NullPointerException whose message echoed the query text; it now pins the 
rejection rather than any failure.
   
   `ID()` has no test, and cannot have one yet. It is unreachable from JPQL in 
memory: `JPQLExpressionBuilder:2013` casts the value from `factory.getThis()` 
to `Path`, the JDBC factory returns a `PCPath` but the in-memory factory 
returns `This extends Val`, so the query dies with
   
       java.lang.ClassCastException: class org.apache.openjpa.kernel.exps.This
           cannot be cast to class org.apache.openjpa.kernel.exps.Path
   
   before the identity is ever evaluated. I confirmed that by writing the test 
and watching it error. That is an older defect, unrelated to this change, and I 
would rather fix it in its own issue than bundle a `This`/`Path` rework in here 
— the unwrap itself is a byte-for-byte mirror of the JDBC projection rule 
(`GetNativeObjectId.load()`), and the existing suites confirm it changes 
nothing else.
   
   Happy to open that issue and add the `ID()` test on top of it if you prefer 
that order.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to