[ 
https://issues.apache.org/jira/browse/OPENJPA-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18139642#comment-18139642
 ] 

ASF subversion and git services commented on OPENJPA-3028:
----------------------------------------------------------

Commit f42d3bc26466c48483361812e4c4fbe8bf876998 in openjpa's branch 
refs/heads/OPENJPA-3028-oracle-functions from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=f42d3bc26 ]

[OPENJPA-3028] Support EXTRACT of all JPA fields on Oracle

Oracle only allows EXTRACT(HOUR/MINUTE/SECOND) on TIMESTAMP values and
failed with ORA-30076 for time and date-time attributes held in DATE
columns; the value is now cast to TIMESTAMP first, which also keeps the
fraction of the second. Oracle has no EXTRACT(QUARTER) and no
EXTRACT(WEEK) (ORA-00907); they are now read with TO_CHAR, IW being the
ISO week that JPA defines.

Behaviour change: the cast to TIMESTAMP drops the time zone of a
TIMESTAMP WITH TIME ZONE column, which is how OffsetDateTime and other
TIMESTAMP_WITH_TIMEZONE attributes are mapped on Oracle. EXTRACT(HOUR)
and EXTRACT(MINUTE) on such an attribute already worked, but returned
the hour and minute in UTC; they now return those of the stored offset,
as OffsetDateTime.getHour() and getMinute() do. For 13:45+02:30, for
example, EXTRACT(HOUR) was 11 and is now 13.

TestExtractDateTimeField and TestEJBQLFunction no longer skip these
fields on Oracle, and TestExtractDateTimeField pins the hour and minute
of an OffsetDateTime on Oracle.


> Jakarta Persistence 3.2 TCK failures on Derby, MySQL and SQL Server
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-3028
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3028
>             Project: OpenJPA
>          Issue Type: Epic
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>         Attachments: run_de.tar.xz, run_ms.tar.xz, run_my.tar.xz, 
> run_or.tar.xz
>
>
> Results of the Jakarta Persistence 3.2 TCK with 
> {{openjpa-integration/tck/run-tck32.sh}} (reported by Maxim Solodovnik on 
> dev@):
> * PostgreSQL 16: passed
> * MySQL 8.4.8: 2134 tests, 43 errors
> * SQL Server 2017-CU12: 2134 tests, 45 errors
> * Derby: 2134 tests, 184 errors
> The sub-tasks group the errors by cause. Several groups show up on more than 
> one database. Where the TCK output only says "<test> failed", the cause still 
> has to be found from the TCK logs.
> Note: the TCK build does not work with Maven 3.10.0; 3.9.x works.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to