[GitHub] carbondata pull request #1103: [WIP] Implement range interval partition

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1103: [WIP] Implement range interval partition

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

    https://github.com/apache/carbondata/pull/1103#discussion_r126376641
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestDDLForPartitionTable.scala ---
    @@ -355,6 +355,189 @@ class TestDDLForPartitionTable  extends QueryTest with BeforeAndAfterAll {
         assert(exception_test_range_decimal.getMessage.contains("Invalid partition definition"))
       }
     
    +  test("create partition table: range interval partition in year") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalYearTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, year')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalYearTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("year"))
    +  }
    +
    +  test("create partition table: range interval partition in month") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalMonthTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, month')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalMonthTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("month"))
    +  }
    +
    +  test("create partition table: range interval partition in week") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalWeekTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, week')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalWeekTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("week"))
    +  }
    +
    +  test("create partition table: range interval partition in day") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalDayTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, day')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalDayTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("day"))
    +  }
    +
    +  test("create partition table: range interval partition in hour") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalHourTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, hour')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalHourTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("hour"))
    +  }
    +  test("Test in some unsupported cases") {
    +    sql("DROP TABLE IF EXISTS test_interval_int")
    +    val exception_test_interval_bigint: Exception = intercept[Exception] {
    +      sql(
    +        """
    +          | CREATE TABLE test_interval_int(col1 INT, col2 STRING)
    +          | PARTITIONED BY (col3 int) STORED BY 'carbondata'
    +          | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +          | 'RANGE_INTERVAL_INFO'='0, 100, year')
    +        """.stripMargin)
    +    }
    +    assert(exception_test_interval_bigint.getMessage.contains("Invalid partition definition"))
    +
    +    sql("DROP TABLE IF EXISTS test_interval_season")
    +    val exception_test_interval_season: Exception = intercept[Exception] {
    +      sql(
    +        """
    +          | CREATE TABLE test_interval_int(col1 INT, col2 STRING)
    +          | PARTITIONED BY (col3 timestamp) STORED BY 'carbondata'
    +          | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +          | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, season')
    +        """.stripMargin)
    --- End diff --
   
    maybe need to add similar unsupported cases for  year/week/day/hour


---
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 #1103: [WIP] Implement range interval partition

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

    https://github.com/apache/carbondata/pull/1103#discussion_r126377354
 
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestDDLForPartitionTable.scala ---
    @@ -355,6 +355,189 @@ class TestDDLForPartitionTable  extends QueryTest with BeforeAndAfterAll {
         assert(exception_test_range_decimal.getMessage.contains("Invalid partition definition"))
       }
     
    +  test("create partition table: range interval partition in year") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalYearTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, year')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalYearTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("year"))
    +  }
    +
    +  test("create partition table: range interval partition in month") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalMonthTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, month')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalMonthTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("month"))
    +  }
    +
    +  test("create partition table: range interval partition in week") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalWeekTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, week')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalWeekTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("week"))
    +  }
    +
    +  test("create partition table: range interval partition in day") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalDayTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, day')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalDayTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("day"))
    +  }
    +
    +  test("create partition table: range interval partition in hour") {
    +    sql(
    +      """
    +        | CREATE TABLE IF NOT EXISTS default.rangeIntervalHourTable (empno int, empname String, designation String,
    +        |  workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (doj Timestamp)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +        | 'RANGE_INTERVAL_INFO'='2017-06-11 00:00:02, 2017-06-13 23:59:59, hour')
    +      """.stripMargin)
    +
    +    val carbonTable = CarbonMetadata.getInstance().getCarbonTable("default_rangeIntervalHourTable")
    +    val partitionInfo = carbonTable.getPartitionInfo(carbonTable.getFactTableName)
    +    assert(partitionInfo != null)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getColumnName.equalsIgnoreCase("doj"))
    +    assert(partitionInfo.getColumnSchemaList.get(0).getDataType == DataType.TIMESTAMP)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.size == 3)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(0) == Encoding.DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(1) == Encoding.DIRECT_DICTIONARY)
    +    assert(partitionInfo.getColumnSchemaList.get(0).getEncodingList.get(2) == Encoding.INVERTED_INDEX)
    +    assert(partitionInfo.getPartitionType == PartitionType.RANGE_INTERVAL)
    +    assert(partitionInfo.getRangeIntervalInfo.size == 3)
    +    assert(partitionInfo.getRangeIntervalInfo.get(0).equals("2017-06-11 00:00:02"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(1).equals("2017-06-13 23:59:59"))
    +    assert(partitionInfo.getRangeIntervalInfo.get(2).equals("hour"))
    +  }
    +  test("Test in some unsupported cases") {
    --- End diff --
   
    add a unsupported cases for wrong range, for example, the first date bigger than the second
    'RANGE_INTERVAL_INFO'='2017-07-07 00:00:02, 2017-06-06 23:59:59, hour'


---
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 #1103: [WIP] Implement range interval partition

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

    https://github.com/apache/carbondata/pull/1103#discussion_r126377929
 
    --- Diff: examples/spark2/src/main/scala/org/apache/carbondata/examples/CarbonPartitionExample.scala ---
    @@ -113,14 +113,31 @@ object CarbonPartitionExample {
            | 'LIST_INFO'='(China,United States),UK ,japan,(Canada,Russia), South Korea ')
            """.stripMargin)
     
    +    // range interval partition
    +    spark.sql("DROP TABLE IF EXISTS t7")
    +
    +    spark.sql("""
    +                | CREATE TABLE IF NOT EXISTS t7
    +                | (
    +                | vin String,
    +                | phonenumber Long,
    +                | country String,
    +                | area String
    +                | )
    +                | PARTITIONED BY (logdate Timestamp)
    +                | STORED BY 'carbondata'
    +                | TBLPROPERTIES('PARTITION_TYPE'='RANGE_INTERVAL',
    +                | 'RANGE_INTERVAL_INFO'='2014/01/01, 2015/01/01, month')
    +              """.stripMargin)
    +
         // show tables
         spark.sql("SHOW TABLES").show()
     
         // drop table
         spark.sql("DROP TABLE IF EXISTS t0")
         spark.sql("DROP TABLE IF EXISTS t1")
         spark.sql("DROP TABLE IF EXISTS t3")
    -    spark.sql("DROP TABLE IF EXISTS t5")
    +    spark.sql("DROP TABLE IF EXISTS t7")
    --- End diff --
   
    where is the drop table for t5?


---
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 #1103: [WIP] Implement range interval partition

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

    https://github.com/apache/carbondata/pull/1103
 
    Can one of the admins verify this patch?


---
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 #1103: [WIP] Implement range interval partition

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

    https://github.com/apache/carbondata/pull/1103
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/46/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1103: [WIP] Implement range interval partition

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

    https://github.com/apache/carbondata/pull/1103
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1223/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1103: [WIP] Implement range interval partition

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

    https://github.com/apache/carbondata/pull/1103
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/592/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1103: [WIP] Implement range interval partition

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user chenerlu closed the pull request at:

    https://github.com/apache/carbondata/pull/1103


---
12