Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1065#discussion_r123231879 --- Diff: core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java --- @@ -465,6 +465,39 @@ public static short toShort(byte[] bytes, int offset, final int length) { } /** + * int => byte[3] + * supported range is [-8388607, 8388607], note that Math.pow(2, 24) == 8388608 + */ + public static byte[] to3Bytes(int val) { + assert val <= (Math.pow(2, 23) - 1) && val >= (-Math.pow(2, 23) + 1); --- End diff -- ok
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---