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

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

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

[OPENJPA-3028] Support EXTRACT(DATE) and EXTRACT(TIME) on Oracle

EXTRACT(DATE) and EXTRACT(TIME) were always rendered as CAST(x AS DATE)
and CAST(x AS TIME). Oracle has no TIME type, so EXTRACT(TIME) failed
with ORA-00932, and an Oracle DATE has a time of day, so EXTRACT(DATE)
kept the time and did not equal the date it was extracted from.

The SQL now comes from the new DBDictionary.getExtractDateTimePartFunction,
which keeps the CAST for other databases. On Oracle the date is truncated
to midnight, and the time is the time of day on 1970-01-01, the way times
are stored and bound there. As such a time is a DATE, EXTRACT(TIME) of a
TIMESTAMP value has whole seconds only on Oracle, its fraction of the
second is dropped. The value occurs twice in the SQL of EXTRACT(TIME) on
Oracle, so a parameter is bound twice.

The tests that skipped Oracle because of the missing TIME type now run
there too.


> 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