You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Ravan (JIRA)" <ji...@apache.org> on 2017/02/10 14:05:41 UTC

[jira] [Created] (DRILL-5250) Date is stored wrongly in HIVE generated JSON

Ravan created DRILL-5250:
----------------------------

             Summary: Date is stored wrongly in HIVE generated JSON
                 Key: DRILL-5250
                 URL: https://issues.apache.org/jira/browse/DRILL-5250
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - JSON
    Affects Versions: 1.8.0
            Reporter: Ravan


Query1: Connected to Oracle Database

select a1.empno,a1.HIREDATE as HIREDATE,a1.SAL as SAL from orcl.xx.EMP a1;

Output:-

EMPNO                   HIREDATE                        SAL
7369.0	1980-12-17T00:00:00.000+05:30	800.0
7499.0	1981-02-20T00:00:00.000+05:30	1600.0
7521.0	1981-02-22T00:00:00.000+05:30	1250.0
7566.0	1981-04-02T00:00:00.000+05:30	2975.0

Query2: Creating a hive table with above query and storage format is JSON

create table intermediate.HIVE.test_16 as  select a1.empno as EMPNO,a1.HIREDATE as HIREDATE,a1.SAL as SAL from orcl.xx.EMP a1;

Query 3: 

SELECT * FROM intermediate.HIVE.test_16

Output:

EMPNO                   HIREDATE                 SAL
7369.0	1980-12-16 18:30:00.000	800.0
7499.0	1981-02-19 18:30:00.000	1600.0
7521.0	1981-02-21 18:30:00.000	1250.0
7566.0	1981-04-01 18:30:00.000	2975.0



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)