rzo1 opened a new pull request, #257:
URL: https://github.com/apache/openjpa/pull/257

   https://issues.apache.org/jira/browse/OPENJPA-3050
   
   In memory, arithmetic with a NULL operand treated the null as 0, so 
`-n.intB` returned 0 and `n.intA / n.intB` failed with a division by zero, 
while the database returns NULL.
   
   - `Filters.op` returns null when an operand is null (`+ - * / MOD POWER 
ROUND`).
   - `ABS`, `SQRT`, `SIGN`, `CEILING`, `FLOOR`, `EXP` and `LN` return null for 
null instead of throwing, which matters when nested, e.g. in `COALESCE`.
   - Same for the in-memory bulk update path in `JDBCStoreQuery`.
   - `SUM`/`AVG` still skip nulls.
   - Migration note added. In-memory `<>` against null keeps its existing 
behaviour (true when one side is null), which the note mentions.
   
   New `TestNullArithmeticInMemory`. Full suites pass on Derby and H2.
   


-- 
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