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

Ravan updated DRILL-5250:
-------------------------
    Description: 
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

Wrong Output for DATE column returning one day before date:

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

  was:
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


> 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
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> 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
> Wrong Output for DATE column returning one day before date:
> 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)

Reply via email to