carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lionelcao <...@git.apache.org>
Subject [GitHub] carbondata pull request #1183: [CARBONDATA-1312] fix list partition compare ...
Date Fri, 21 Jul 2017 08:19:17 GMT
Github user lionelcao commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1183#discussion_r128708018
  
    --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestQueryForPartitionTable.scala
---
    @@ -77,8 +61,36 @@ class TestQueryForPartitionTable  extends QueryTest with BeforeAndAfterAll
{
             | TBLPROPERTIES('PARTITION_TYPE'='RANGE',
             |  'RANGE_INFO'='01-01-2010, 01-01-2015, 01-04-2015, 01-07-2015')
           """.stripMargin)
    +
    +    sql(
    +      """
    +        | CREATE TABLE listTable (empno int, empname String, designation String, doj
Timestamp,
    +        |  workgroupcategoryname String, deptno int, deptname String,
    +        |  projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance
int,
    +        |  utilization int,salary int)
    +        | PARTITIONED BY (workgroupcategory int)
    +        | STORED BY 'org.apache.carbondata.format'
    +        | TBLPROPERTIES('PARTITION_TYPE'='LIST',
    +        |  'LIST_INFO'='0, 1, (2, 3)')
    +      """.stripMargin)
    +
    +    sql(s"""LOAD DATA local inpath '$resourcesPath/data.csv' INTO TABLE listTable OPTIONS('DELIMITER'=
',', 'QUOTECHAR'= '"')""")
         sql(s"""LOAD DATA local inpath '$resourcesPath/data.csv' INTO TABLE rangeTable OPTIONS('DELIMITER'=
',', 'QUOTECHAR'= '"')""")
    +    sql(s"""LOAD DATA local inpath '$resourcesPath/data.csv' INTO TABLE hashTable OPTIONS('DELIMITER'=
',', 'QUOTECHAR'= '"')""")
    +    sql(s"""LOAD DATA local inpath '$resourcesPath/data.csv' INTO TABLE originTable OPTIONS('DELIMITER'=
',', 'QUOTECHAR'= '"')""")
    +
    +  }
     
    +  test("detail query on partition table: hash table") {
    +    // EqualTo
    +    checkAnswer(sql("select empno, empname, designation, doj, workgroupcategory, workgroupcategoryname,
deptno, deptname, projectcode, projectjoindate, projectenddate, attendance, utilization, salary
from hashTable where empno = 13"),
    +      sql("select  empno, empname, designation, doj, workgroupcategory, workgroupcategoryname,
deptno, deptname, projectcode, projectjoindate, projectenddate, attendance, utilization, salary
from originTable where empno = 13"))
    +    // In
    +    checkAnswer(sql("select empno, empname, designation, doj, workgroupcategory, workgroupcategoryname,
deptno, deptname, projectcode, projectjoindate, projectenddate, attendance, utilization, salary
from hashTable where empno in (11, 13)"),
    +      sql("select  empno, empname, designation, doj, workgroupcategory, workgroupcategoryname,
deptno, deptname, projectcode, projectjoindate, projectenddate, attendance, utilization, salary
from originTable where empno in (11, 13)"))
    +  }
    +
    +  test("detail query on partition table: range partition") {
    --- End diff --
    
    test case added.


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