Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-615

Update query store wrong value for Date data type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 1.0.0-incubating
    • None
    • data-query
    • None
    • Spark 1.6 Spark 2.1

    Description

      I am trying to update DOB column with Date Data Type. It is storing a day before date which I have mentioned for updating in DOB column.

      Create Table : CREATE TABLE uniqdata (CUST_ID int,CUST_NAME char(30),ACTIVE_EMUI_VERSION string, DOB Date, DOJ Date, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double, INTEGER_COLUMN1 int) STORED BY 'org.apache.carbondata.format';

      Load Data : LOAD DATA INPATH 'hdfs://localhost:54310/2000_UniqData.csv' into table uniqdata OPTIONS ('DELIMITER'=',' ,'QUOTECHAR'='"','BAD_RECORDS_ACTION'='FORCE','FILEHEADER'='CUST_ID,CUST_NAME,ACTIVE_EMUI_VERSION,DOB,DOJ,BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1,Double_COLUMN2,INTEGER_COLUMN1','SINGLE_PASS'='true');

      Update Query : update uniqdata set (dob)=(to_date('2016-12-01')) where cust_name = 'CUST_NAME_01999';

      Expected Result : It should update DOB column with 2016-12-01.

      Actual Result : It is updating DOB column with 2016-11-30.

      Attachments

        1. 2000_UniqData.csv
          416 kB
          Anurag Srivastava
        2. update_dob.png
          64 kB
          Anurag Srivastava

        Activity

          People

            ravikiran23 ravikiran
            anuragknoldus Anurag Srivastava
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: