VenuReddy2103 commented on a change in pull request #3896: URL: https://github.com/apache/carbondata/pull/3896#discussion_r472288683
########## File path: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataWithDiffTimestampFormat.scala ########## @@ -306,6 +307,39 @@ class TestLoadDataWithDiffTimestampFormat extends QueryTest with BeforeAndAfterA } } + test("test load, update data with daylight saving time from different timezone") { + CarbonProperties.getInstance().addProperty( + CarbonCommonConstants.CARBON_LOAD_SETLENIENT_ENABLE, "true") + val defaultTimeZone = TimeZone.getDefault + TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai")) + sql("DROP TABLE IF EXISTS t3") + sql( + """ + CREATE TABLE IF NOT EXISTS t3 + (ID Int, date date, starttime Timestamp, country String, + name String, phonetype String, serialname String, salary Int) + STORED AS carbondata TBLPROPERTIES('dateformat'='yyyy/MM/dd', + 'timestampformat'='yyyy-MM-dd HH:mm') + """) + sql(s" LOAD DATA LOCAL INPATH '$resourcesPath/timeStampFormatData3.csv' into table t3") + sql(s"insert into t3 select 11,'2015-7-23','1941-3-15 00:00:00','china','aaa1','phone197'," + + s"'ASD69643',15000") + sql("update t3 set (starttime) = ('1941-3-15 00:00:00') where name='aaa2'") + checkAnswer( + sql("SELECT starttime FROM t3 WHERE ID = 1"), + Seq(Row(Timestamp.valueOf("1941-3-15 01:00:00"))) + ) + checkAnswer( + sql("SELECT starttime FROM t3 WHERE ID = 11"), + Seq(Row(Timestamp.valueOf("1941-3-15 01:00:00"))) + ) + checkAnswer( + sql("SELECT starttime FROM t3 WHERE ID = 2"), + Seq(Row(Timestamp.valueOf("1941-3-15 01:00:00"))) + ) + TimeZone.setDefault(defaultTimeZone) Review comment: Remove `CARBON_LOAD_SETLENIENT_ENABLE` from carbon properies at the end of testcase. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org