carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From QiangCai <...@git.apache.org>
Subject [GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...
Date Wed, 21 Jun 2017 08:00:21 GMT
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123177702
  
    --- 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 --
    
    better to use final static variable, although JIT can improve it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message