You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Nishant Bangarwa (JIRA)" <ji...@apache.org> on 2018/08/08 20:30:00 UTC
[jira] [Created] (HIVE-20341) Druid Needs Explicit CASTs from
Timestamp to STRING when the output of timestamp function is used as String
Nishant Bangarwa created HIVE-20341:
---------------------------------------
Summary: Druid Needs Explicit CASTs from Timestamp to STRING when the output of timestamp function is used as String
Key: HIVE-20341
URL: https://issues.apache.org/jira/browse/HIVE-20341
Project: Hive
Issue Type: Bug
Reporter: Nishant Bangarwa
Druid timestamp expression functions returns numeric values in form of millis since epoch.
Functions that use the output of the timestamp functions as String return different values for tables stored in HIVE and Druid.
{code}
SELECT SUBSTRING(to_date(datetime0),4) FROM tableau_orc.calcs;
| 4-07-25 |
SELECT SUBSTRING(to_date(datetime0),4) FROM druid_tableau.calcs;
| 0022400000 |
SELECT CONCAT(to_date(datetime0),' 00:00:00') FROM tableau_orc.calcs;
| 2004-07-17 00:00:00 |
SELECT CONCAT(to_date(datetime0),' 00:00:00') FROM druid_tableau.calcs;
| 1090454400000 00:00:00 |
{code}
We need to add explicit CAST to String before generating Druid expressions.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)