[GitHub] carbondata pull request #1065: Add short int type support

classic Classic list List threaded Threaded
43 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123176230
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingStrategy.java ---
    @@ -29,24 +29,31 @@
     
       private static final Compressor compressor = CompressorFactory.getInstance().getCompressor();
     
    +  private static final int THREE_BYTES_MAX = (int) Math.pow(2, 23) - 1;
    +  private static final int THREE_BYTES_MIN = - THREE_BYTES_MAX;
    --- End diff --
   
    THREE_BYTES_MIN = - (THREE_BYTES_MAX + 1)


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123177876
 
    --- 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 --
   
    range can be [-Math.pow(2, 23),  Math.pow(2, 23) -1]


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123183129
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/aggquery/IntegerDataTypeTestCase.scala ---
    @@ -39,6 +42,79 @@ class IntegerDataTypeTestCase extends QueryTest with BeforeAndAfterAll {
           Seq(Row(11), Row(12), Row(13), Row(14), Row(15), Row(16), Row(17), Row(18), Row(19), Row(20)))
       }
     
    --- End diff --
   
    in beforAll method, should dorp table integertypetableAgg before creation


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123183243
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/aggquery/IntegerDataTypeTestCase.scala ---
    @@ -39,6 +42,79 @@ class IntegerDataTypeTestCase extends QueryTest with BeforeAndAfterAll {
           Seq(Row(11), Row(12), Row(13), Row(14), Row(15), Row(16), Row(17), Row(18), Row(19), Row(20)))
       }
     
    +  test("short int table boundary test, safe column page") {
    +    sql(
    +      """
    +        | DROP TABLE IF EXISTS short_int_table
    +      """.stripMargin)
    +    // value column is less than short int, value2 column is bigger than short int
    +    sql(
    +      """
    +        | CREATE TABLE short_int_table
    +        | (value int, value2 int, name string)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +    sql(
    +      s"""
    +        | LOAD DATA LOCAL INPATH '$resourcesPath/shortintboundary.csv'
    +        | INTO TABLE short_int_table
    +      """.stripMargin)
    +    checkAnswer(
    +      sql("select value from short_int_table"),
    +      Seq(Row(0), Row(127), Row(128), Row(-127), Row(-128), Row(32767), Row(-32767), Row(32768), Row(-32768), Row(65535),
    +        Row(-65535), Row(8388606), Row(-8388606), Row(8388607), Row(-8388607), Row(0), Row(0), Row(0), Row(0))
    +    )
    +    checkAnswer(
    +      sql("select value2 from short_int_table"),
    +      Seq(Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0),
    +        Row(0), Row(0), Row(0), Row(0), Row(0), Row(8388608), Row(-8388608), Row(8388609), Row(-8388609))
    +    )
    +    sql(
    +      """
    +        | DROP TABLE short_int_table
    +      """.stripMargin)
    +  }
    +
    +  test("short int table boundary test, unsafe column page") {
    +    CarbonProperties.getInstance().addProperty(
    +      CarbonCommonConstants.ENABLE_UNSAFE_COLUMN_PAGE_LOADING, "true"
    +    )
    +    sql(
    +      """
    +        | DROP TABLE IF EXISTS short_int_table
    +      """.stripMargin)
    +    // value column is less than short int, value2 column is bigger than short int
    +    sql(
    +      """
    +        | CREATE TABLE short_int_table
    +        | (value int, value2 int, name string)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +    sql(
    +      s"""
    +         | LOAD DATA LOCAL INPATH '$resourcesPath/shortintboundary.csv'
    +         | INTO TABLE short_int_table
    +      """.stripMargin)
    +    checkAnswer(
    +      sql("select value from short_int_table"),
    +      Seq(Row(0), Row(127), Row(128), Row(-127), Row(-128), Row(32767), Row(-32767), Row(32768), Row(-32768), Row(65535),
    +        Row(-65535), Row(8388606), Row(-8388606), Row(8388607), Row(-8388607), Row(0), Row(0), Row(0), Row(0))
    +    )
    +    checkAnswer(
    +      sql("select value2 from short_int_table"),
    +      Seq(Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0),
    +        Row(0), Row(0), Row(0), Row(0), Row(0), Row(8388608), Row(-8388608), Row(8388609), Row(-8388609))
    +    )
    +    sql(
    +      """
    +        | DROP TABLE short_int_table
    +      """.stripMargin)
    +    CarbonProperties.getInstance().addProperty(
    +      CarbonCommonConstants.ENABLE_UNSAFE_COLUMN_PAGE_LOADING,
    +      CarbonCommonConstants.ENABLE_UNSAFE_COLUMN_PAGE_LOADING_DEFAULT
    +    )
    +  }
    +
       override def afterAll {
         sql("drop table integertypetableAgg")
    --- End diff --
   
    add "if exists"


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
    @jackylk I change the code as following. Two test case passed.
   
    ```
      public static byte[] to3Bytes(int val) {
        return new byte[]{(byte)(val >> 16), (byte)(val >> 8), (byte)(val) };
      }
   
      public static int valueOf3Bytes(byte[] val, int offset) {
        if (val[offset] < 0) {
          return (((val[offset] & 0xffff) << 16) |
                  ((val[offset + 1] & 0xff) << 8) |
                  ((val[offset + 2] & 0xff)));
        } else {
          return (((val[offset] & 0xff) << 16) |
                  ((val[offset + 1] & 0xff) << 8) |
                  ((val[offset + 2] & 0xff)));
        }
      }
    ```
    ```
      private static final int THREE_BYTES_MAX = (int) Math.pow(2, 23) - 1;
      private static final int THREE_BYTES_MIN = - (THREE_BYTES_MAX + 1);
    ```



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123231835
 
    --- 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);
    +
    +    int value = val < 0 ? -val : val;
    +    byte[] b = new byte[3];
    +    b[0] = (byte) (value & 0xFF);
    +    b[1] = (byte) ((value >>> 8) & 0xFF);
    +    b[2] = (byte) ((value >>> 16) & 0x7F);
    +    if (val < 0) {
    +      b[2] |= 0x80;
    +    }
    +    return b;
    +  }
    +
    +  /**
    +   * convert 3 bytes to int
    +   */
    +  public static int valueOf3Bytes(byte[] val, int offset) {
    +    assert val.length >= offset + 3;
    +    int out = (val[offset] & 0xFF);
    +    out |= ((val[offset + 1] & 0xFF) << 8);
    +    out |= ((val[offset + 2] & 0x7F) << 16);
    +    if ((val[offset + 2] & 0x80) != 0) {
    +      return -out;
    +    } else {
    +      return out;
    +    }
    --- 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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123231854
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/DefaultEncodingStrategy.java ---
    @@ -29,24 +29,31 @@
     
       private static final Compressor compressor = CompressorFactory.getInstance().getCompressor();
     
    +  private static final int THREE_BYTES_MAX = (int) Math.pow(2, 23) - 1;
    +  private static final int THREE_BYTES_MIN = - THREE_BYTES_MAX;
    --- 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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123231904
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/aggquery/IntegerDataTypeTestCase.scala ---
    @@ -39,6 +42,79 @@ class IntegerDataTypeTestCase extends QueryTest with BeforeAndAfterAll {
           Seq(Row(11), Row(12), Row(13), Row(14), Row(15), Row(16), Row(17), Row(18), Row(19), Row(20)))
       }
     
    --- 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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123231920
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/aggquery/IntegerDataTypeTestCase.scala ---
    @@ -39,6 +42,79 @@ class IntegerDataTypeTestCase extends QueryTest with BeforeAndAfterAll {
           Seq(Row(11), Row(12), Row(13), Row(14), Row(15), Row(16), Row(17), Row(18), Row(19), Row(20)))
       }
     
    +  test("short int table boundary test, safe column page") {
    +    sql(
    +      """
    +        | DROP TABLE IF EXISTS short_int_table
    +      """.stripMargin)
    +    // value column is less than short int, value2 column is bigger than short int
    +    sql(
    +      """
    +        | CREATE TABLE short_int_table
    +        | (value int, value2 int, name string)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +    sql(
    +      s"""
    +        | LOAD DATA LOCAL INPATH '$resourcesPath/shortintboundary.csv'
    +        | INTO TABLE short_int_table
    +      """.stripMargin)
    +    checkAnswer(
    +      sql("select value from short_int_table"),
    +      Seq(Row(0), Row(127), Row(128), Row(-127), Row(-128), Row(32767), Row(-32767), Row(32768), Row(-32768), Row(65535),
    +        Row(-65535), Row(8388606), Row(-8388606), Row(8388607), Row(-8388607), Row(0), Row(0), Row(0), Row(0))
    +    )
    +    checkAnswer(
    +      sql("select value2 from short_int_table"),
    +      Seq(Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0),
    +        Row(0), Row(0), Row(0), Row(0), Row(0), Row(8388608), Row(-8388608), Row(8388609), Row(-8388609))
    +    )
    +    sql(
    +      """
    +        | DROP TABLE short_int_table
    +      """.stripMargin)
    +  }
    +
    +  test("short int table boundary test, unsafe column page") {
    +    CarbonProperties.getInstance().addProperty(
    +      CarbonCommonConstants.ENABLE_UNSAFE_COLUMN_PAGE_LOADING, "true"
    +    )
    +    sql(
    +      """
    +        | DROP TABLE IF EXISTS short_int_table
    +      """.stripMargin)
    +    // value column is less than short int, value2 column is bigger than short int
    +    sql(
    +      """
    +        | CREATE TABLE short_int_table
    +        | (value int, value2 int, name string)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +    sql(
    +      s"""
    +         | LOAD DATA LOCAL INPATH '$resourcesPath/shortintboundary.csv'
    +         | INTO TABLE short_int_table
    +      """.stripMargin)
    +    checkAnswer(
    +      sql("select value from short_int_table"),
    +      Seq(Row(0), Row(127), Row(128), Row(-127), Row(-128), Row(32767), Row(-32767), Row(32768), Row(-32768), Row(65535),
    +        Row(-65535), Row(8388606), Row(-8388606), Row(8388607), Row(-8388607), Row(0), Row(0), Row(0), Row(0))
    +    )
    +    checkAnswer(
    +      sql("select value2 from short_int_table"),
    +      Seq(Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0),
    +        Row(0), Row(0), Row(0), Row(0), Row(0), Row(8388608), Row(-8388608), Row(8388609), Row(-8388609))
    +    )
    +    sql(
    +      """
    +        | DROP TABLE short_int_table
    +      """.stripMargin)
    +    CarbonProperties.getInstance().addProperty(
    +      CarbonCommonConstants.ENABLE_UNSAFE_COLUMN_PAGE_LOADING,
    +      CarbonCommonConstants.ENABLE_UNSAFE_COLUMN_PAGE_LOADING_DEFAULT
    +    )
    +  }
    +
       override def afterAll {
         sql("drop table integertypetableAgg")
    --- 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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
    @QiangCai fixed, please check


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/2634/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
   
    Refer to this link for build results (access rights to CI server needed):
    https://builds.apache.org/job/carbondata-pr-spark-1.6/543/<h2>Failed Tests: <span class='status-failure'>1</span></h2><h3><a name='carbondata-pr-spark-1.6/org.apache.carbondata:carbondata-spark-common-test' /><a href='https://builds.apache.org/job/carbondata-pr-spark-1.6/543/org.apache.carbondata$carbondata-spark-common-test/testReport'>carbondata-pr-spark-1.6/org.apache.carbondata:carbondata-spark-common-test</a>: <span class='status-failure'>1</span></h3><ul><li><a href='https://builds.apache.org/job/carbondata-pr-spark-1.6/543/org.apache.carbondata$carbondata-spark-common-test/testReport/org.apache.carbondata.spark.testsuite.dataload/TestBatchSortDataLoad/test_batch_sort_load_by_passing_option_in_one_load_and_with_out_option_in_other_load_and_then_do_compaction/'><strong>org.apache.carbondata.spark.testsuite.dataload.TestBatchSortDataLoad.test batch sort load by passing option in one load and with out option in other load and then do compaction</strong></a></li></ul>



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
    retest this please


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/2638/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
   
    Refer to this link for build results (access rights to CI server needed):
    https://builds.apache.org/job/carbondata-pr-spark-1.6/547/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1065: [CARBONDATA-1196] Add 3 bytes data type suppo...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user QiangCai commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1065#discussion_r123543556
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/aggquery/IntegerDataTypeTestCase.scala ---
    @@ -39,7 +43,80 @@ class IntegerDataTypeTestCase extends QueryTest with BeforeAndAfterAll {
           Seq(Row(11), Row(12), Row(13), Row(14), Row(15), Row(16), Row(17), Row(18), Row(19), Row(20)))
       }
     
    +  test("short int table boundary test, safe column page") {
    +    sql(
    +      """
    +        | DROP TABLE IF EXISTS short_int_table
    +      """.stripMargin)
    +    // value column is less than short int, value2 column is bigger than short int
    +    sql(
    +      """
    +        | CREATE TABLE short_int_table
    +        | (value int, value2 int, name string)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +    sql(
    +      s"""
    +        | LOAD DATA LOCAL INPATH '$resourcesPath/shortintboundary.csv'
    +        | INTO TABLE short_int_table
    +      """.stripMargin)
    +    checkAnswer(
    +      sql("select value from short_int_table"),
    +      Seq(Row(0), Row(127), Row(128), Row(-127), Row(-128), Row(32767), Row(-32767), Row(32768), Row(-32768), Row(65535),
    +        Row(-65535), Row(8388606), Row(-8388606), Row(8388607), Row(-8388607), Row(0), Row(0), Row(0), Row(0))
    +    )
    +    checkAnswer(
    +      sql("select value2 from short_int_table"),
    +      Seq(Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0),
    +        Row(0), Row(0), Row(0), Row(0), Row(0), Row(8388608), Row(-8388608), Row(8388609), Row(-8388609))
    +    )
    +    sql(
    +      """
    +        | DROP TABLE short_int_table
    +      """.stripMargin)
    +  }
    +
    +  test("short int table boundary test, unsafe column page") {
    +    CarbonProperties.getInstance().addProperty(
    +      CarbonCommonConstants.ENABLE_UNSAFE_COLUMN_PAGE_LOADING, "true"
    +    )
    +    sql(
    +      """
    +        | DROP TABLE IF EXISTS short_int_table
    +      """.stripMargin)
    +    // value column is less than short int, value2 column is bigger than short int
    +    sql(
    +      """
    +        | CREATE TABLE short_int_table
    +        | (value int, value2 int, name string)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +    sql(
    +      s"""
    +         | LOAD DATA LOCAL INPATH '$resourcesPath/shortintboundary.csv'
    +         | INTO TABLE short_int_table
    +      """.stripMargin)
    +    checkAnswer(
    +      sql("select value from short_int_table"),
    +      Seq(Row(0), Row(127), Row(128), Row(-127), Row(-128), Row(32767), Row(-32767), Row(32768), Row(-32768), Row(65535),
    +        Row(-65535), Row(8388606), Row(-8388606), Row(8388607), Row(-8388607), Row(0), Row(0), Row(0), Row(0))
    +    )
    +    checkAnswer(
    +      sql("select value2 from short_int_table"),
    +      Seq(Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0), Row(0),
    +        Row(0), Row(0), Row(0), Row(0), Row(0), Row(8388608), Row(-8388608), Row(8388609), Row(-8388609))
    +    )
    +    sql(
    +      """
    +        | DROP TABLE short_int_table
    +      """.stripMargin)
    +    CarbonProperties.getInstance().addProperty(
    --- End diff --
   
    please move this code to afterAll function


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/2666/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1065: [CARBONDATA-1196] Add 3 bytes data type support in v...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1065
 
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/94/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
123