Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5250

Date is stored wrongly in HIVE generated JSON

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8.0
    • Fix Version/s: None
    • Component/s: Storage - JSON
    • Labels:
      None
    • Flags:
      Important

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Ravanth Ravan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: