[
https://issues.apache.org/jira/browse/OPENJPA-3029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134619#comment-18134619
]
ASF subversion and git services commented on OPENJPA-3029:
----------------------------------------------------------
Commit ead321648648cef2e314582112726ac7edc497fa in openjpa's branch
refs/heads/OPENJPA-3044 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=ead321648 ]
[OPENJPA-3029][OPENJPA-3037] Fix EXTRACT on Derby and EXTRACT(WEEK) on MySQL
and MariaDB (#236)
* [OPENJPA-3029] Render EXTRACT on Derby with its per-field date and time
functions
* [OPENJPA-3037] Extract the ISO week on MySQL and MariaDB
* [OPENJPA-3037] Extract the ISO week on H2 whatever the JVM locale
* [OPENJPA-3029] Use try-with-resources in the test
* [OPENJPA-3029] Use pattern matching for the cast of the extract operand
> Derby: EXTRACT is not supported
> -------------------------------
>
> Key: OPENJPA-3029
> URL: https://issues.apache.org/jira/browse/OPENJPA-3029
> Project: OpenJPA
> Issue Type: Sub-task
> Reporter: Richard Zowalla
> Priority: Major
> Fix For: 4.2.0
>
>
> Derby has no {{EXTRACT(field FROM x)}}, so every EXTRACT in the TCK fails with
> {noformat}42X01 : Encountered "FROM" ... {SELECT EXTRACT(DAY FROM
> t0.DATATYPES2_ID) FROM DATATYPES2 t0 ...}{noformat}
> Derby has {{YEAR()}}, {{MONTH()}}, {{DAY()}}, {{HOUR()}}, {{MINUTE()}} and
> {{SECOND()}}. QUARTER and WEEK have to be computed from those.
> {{DerbyDictionary}} should render EXTRACT with these functions.
> Failing tests:
> * {{Client4.testExtractDate*}}, {{testExtractDateTime*}},
> {{testExtractTime*}} (14)
> * {{Client9.testExtract*From*}} (8, criteria API)
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)