QiangCai commented on a change in pull request #3598: [CARBONDATA-3684] Remove 
MDK and cardinality in write path
URL: https://github.com/apache/carbondata/pull/3598#discussion_r376839786
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java
 ##########
 @@ -756,4 +756,45 @@ public static long toLongLittleEndian(byte[] bytes, int 
offset) {
         ((long) bytes[offset + 3] & 0xff) << 24) | (((long) bytes[offset + 2] 
& 0xff) << 16) | (
         ((long) bytes[offset + 1] & 0xff) << 8) | (((long) bytes[offset] & 
0xff)));
   }
+
+  public static byte[] convertDateToBytes(int date) {
+    return ByteUtil.toBytes(date);
+  }
+
+  public static byte[] convertDateToBytes(long[] date) {
+    byte[] output = new byte[date.length * 4];
+    for (int i = 0; i < date.length; i++) {
+      System.arraycopy(ByteUtil.toBytes(date[i]), 0, output, i * 4, 4);
+    }
+    return output;
+  }
+
+  public static int convertBytesToDate(byte[] date) {
 
 Review comment:
   How about convertDateBytesToInt

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to