Login  Register

[GitHub] [carbondata] kunal642 commented on a change in pull request #3970: [CARBONDATA-4007] Fix multiple issues in SDK_IUD

Posted by GitBox on Oct 14, 2020; 4:53am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-Karan980-opened-a-new-pull-request-3970-CARBONDATA-4007-Fix-multiple-issues-in-SDKD-tp101429p101895.html


kunal642 commented on a change in pull request #3970:
URL: https://github.com/apache/carbondata/pull/3970#discussion_r504400394



##########
File path: sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonIUD.java
##########
@@ -173,10 +184,16 @@ public void update(String path, Expression filterExpression,
     RecordWriter<NullWritable, ObjectArrayWritable> deleteDeltaWriter =
         CarbonTableOutputFormat.getDeleteDeltaRecordWriter(path);
     ObjectArrayWritable writable = new ObjectArrayWritable();
-
+    long day = 24L * 3600 * 1000;
     while (reader.hasNext()) {
       Object[] row = (Object[]) reader.readNextRow();
       writable.set(Arrays.copyOfRange(row, row.length - 1, row.length));
+      for (Integer dateIndex : dateIndexes) {
+        row[dateIndex] = new Date((day * ((int) row[dateIndex])));

Review comment:
       Date and Timestamp conversion should be in SDK reader. Please fix the reader




----------------------------------------------------------------
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:
[hidden email]