You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Hongze Zhang (JIRA)" <ji...@apache.org> on 2019/03/19 07:22:00 UTC

[jira] [Updated] (CALCITE-2933) In Druid adapter, expression like "cast(cast(\"timestamp\" as timestamp) as varchar)" returns as epoch millisecond

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

Hongze Zhang updated CALCITE-2933:
----------------------------------
    Affects Version/s: 1.18.0

> In Druid adapter, expression like "cast(cast(\"timestamp\" as timestamp) as varchar)" returns as epoch millisecond
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2933
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2933
>             Project: Calcite
>          Issue Type: Improvement
>    Affects Versions: 1.18.0
>            Reporter: Hongze Zhang
>            Priority: Major
>
> SQL 1:
> {code}
> select cast("timestamp" as timestamp) as t from "foodmart" order by t limit 1
> {code}
> Result:
> {code}
> T=1997-01-01 00:00:00
> {code}
> SQL 2:
> {code}
> select cast(cast("timestamp" as timestamp) as varchar) as t from "foodmart" order by t limit 1
> {code}
> Result:
> {code}
> T=852076800000
> {code}
> The second query should returns the same value as the first one.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)