You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2024/02/27 01:33:00 UTC

[jira] [Assigned] (CALCITE-6282) Avatica ignores time precision when returning TIME results

     [ https://issues.apache.org/jira/browse/CALCITE-6282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mihai Budiu reassigned CALCITE-6282:
------------------------------------

    Assignee: Mihai Budiu

> Avatica ignores time precision when returning TIME results
> ----------------------------------------------------------
>
>                 Key: CALCITE-6282
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6282
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica, core
>    Affects Versions: 1.36.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>
> SqlOperatorTest contains the following disabled test:
> {code:java}
> f.checkScalar("cast(TIME '12:42:25.34' as TIME(2))",
>         "12:42:25.34", "TIME(2) NOT NULL");
> {code}
> This test is disabled based on the following condition;
> {code:java}
>   /**
>    * Whether <a href="http://issues.eigenbase.org/browse/FRG-282">issue
>    * FRG-282: Support precision in TIME and TIMESTAMP data types</a> is fixed.
>    */
>   public static final boolean FRG282_FIXED = true;
> {code}
> However, the result is computed correctly. The precision is lost in the JDBC layer, which creates a TimeFromNumberAccessor which does not depend on the precision of the target type: it always returns the time with a precision of 0.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)