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

   https://issues.apache.org/jira/browse/OPENJPA-2935
   
   Criteria literals in `COALESCE`, `CASE` and `NULLIF` are written into the 
SQL text. A `java.util.Date`, `Calendar` or `java.time` value was written as 
its unquoted `toString()`, e.g. `COALESCE(t0.due,2025-04-08 11:56:02.93)`, 
which every database rejects (select list and ORDER BY alike).
   
   Dates, times and timestamps, including `Calendar` and the `java.time` local 
types, are now written as JDBC escaped date-time literals, which are typed and 
identical wherever the expression is repeated (so DISTINCT + ORDER BY and GROUP 
BY work on PostgreSQL). Other values without a literal form, such as a 
`Character`, are bound instead of written as their `toString()`, and GROUP BY 
keeps the parameters of the grouped expression. Offset/zoned types stay bound.
   
   New `TestTemporalCoalesce` (all six temporal types, plain and `cb.literal`, 
select list, ORDER BY, DISTINCT, CASE, with and without `setMaxResults`) fails 
on master; criteria, JPQL, query and GROUP BY tests (763) pass on Derby and 
PostgreSQL 18.
   
   CI: the TCK and Databases workflows were started on this branch; this PR 
stays a draft until both pass.
   


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