Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
1.0.0-incubating
-
None
-
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.