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

   https://issues.apache.org/jira/browse/OPENJPA-3029
   https://issues.apache.org/jira/browse/OPENJPA-3037
   
   Two EXTRACT failures from the Jakarta Persistence 3.2 TCK (OPENJPA-3028), 
one commit each.
   
   - New hook `DBDictionary.getExtractDateTimeFieldFunction(field)`; the 
default renders the same SQL as before.
   - **OPENJPA-3029:** Derby has no `EXTRACT`. It now uses `YEAR()`, `MONTH()`, 
`DAY()`, `HOUR()`, `MINUTE()`, `SECOND()`, QUARTER as `((MONTH(x) + 2) / 3)`; 
WEEK throws `UnsupportedException`. Derby's date functions reject `?`, so a 
parameter or criteria literal operand is cast to DATE/TIME/TIMESTAMP 
(`RequiresCastForExtractOperand`, true on Derby only).
   - **OPENJPA-3037:** MySQL and MariaDB render WEEK as `WEEK(x, 3)`, the ISO 
week (2024-01-01 was 0, now 1). Migration note added.
   
   New `TestExtractDateTimeField`; the Derby skips in `TestEJBQLFunction` are 
removed except WEEK. Full suite passes on Derby and H2, WEEK tested on MySQL 
8.4.
   


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