[
https://issues.apache.org/jira/browse/CALCITE-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Mior updated CALCITE-2938:
----------------------------------
Fix Version/s: (was: 1.20.0)
> Druid adapter do wrong behavior for casts from timestamp type to date type
> --------------------------------------------------------------------------
>
> Key: CALCITE-2938
> URL: https://issues.apache.org/jira/browse/CALCITE-2938
> Project: Calcite
> Issue Type: Improvement
> Components: druid-adapter
> Affects Versions: 1.19.0
> Reporter: Danny Chan
> Assignee: Danny Chan
> Priority: Major
>
> For sql like
> {code:java}
> Select cast("timestamp" as date) as t from "foodmart" order by t limit 1
> {code}
> It produces results:
> 3242-06-03
> while it expects to be:
> 1997-01-01
> You can past the code
> {code:java}
> @Test
> public void testCastTimestamp() {
> final String sql = "Select cast(\"timestamp\" as date) as t"
> + " from \"foodmart\" order by t limit 1";
> sql(sql, FOODMART)
> .returnsOrdered("T=1997-01-01 00:00:00")
> .queryContains(
> druidChecker("UTC"));
> }
> {code}
> in DruidAdapterIT2 and reproduce it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)