Github user chenliang613 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1186#discussion_r128705965
  
    --- Diff: 
integration/spark2/src/test/scala/org/apache/spark/carbondata/restructure/vectorreader/AddColumnTestCases.scala
 ---
    @@ -42,91 +43,263 @@ class AddColumnTestCases extends Spark2QueryTest with 
BeforeAndAfterAll {
           "('DICTIONARY_EXCLUDE'='charField', 
'DEFAULT.VALUE.charfield'='def')")
         sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/restructure/data1.csv' 
INTO TABLE addcolumntest " +
             
s"options('FILEHEADER'='intField,stringField,charField,timestampField,decimalField')")
    +    sql("CREATE TABLE hivetable stored as parquet select * from 
addcolumntest")
       }
     
       test("test like query on new column") {
    +    sqlContext.setConf("carbon.enable.vector.reader", "true")
    +    checkAnswer(sql("select charField from addcolumntest where charField 
like 'd%'"), Row("def"))
    +
    +    sqlContext.setConf("carbon.enable.vector.reader", "false")
         checkAnswer(sql("select charField from addcolumntest where charField 
like 'd%'"), Row("def"))
       }
     
       test("test is not null filter on new column") {
    +    sqlContext.setConf("carbon.enable.vector.reader", "true")
    +    checkAnswer(sql("select charField from addcolumntest where charField 
is not null"),
    +      Seq(Row("abc"), Row("def")))
    +
    +    sqlContext.setConf("carbon.enable.vector.reader", "false")
         checkAnswer(sql("select charField from addcolumntest where charField 
is not null"),
           Seq(Row("abc"), Row("def")))
       }
     
       test("test is null filter on new column") {
    +    sqlContext.setConf("carbon.enable.vector.reader", "true")
    +    checkAnswer(sql("select charField from addcolumntest where charField 
is null"), Seq())
    +
    +    sqlContext.setConf("carbon.enable.vector.reader", "false")
         checkAnswer(sql("select charField from addcolumntest where charField 
is null"), Seq())
       }
     
       test("test equals filter on new column") {
    +    sqlContext.setConf("carbon.enable.vector.reader", "true")
         checkAnswer(sql("select charField from addcolumntest where charField = 
'abc'"), Row("abc"))
    -  }
     
    -  test("test add dictionary column and test greaterthan/lessthan filter on 
new column") {
    -    sql(
    -      "Alter table addcolumntest add columns(intnewField int) 
TBLPROPERTIES" +
    -      "('DICTIONARY_INCLUDE'='intnewField', 
'DEFAULT.VALUE.intNewField'='5')")
    -    checkAnswer(sql("select charField from addcolumntest where intnewField 
> 2"),
    -      Seq(Row("abc"), Row("def")))
    -    checkAnswer(sql("select charField from addcolumntest where intnewField 
< 2"), Seq())
    +    sqlContext.setConf("carbon.enable.vector.reader", "false")
    +    checkAnswer(sql("select charField from addcolumntest where charField = 
'abc'"), Row("abc"))
       }
     
    +  test("test add dictionary column and test greaterthan/lessthan filter on 
new column") ({
    --- End diff --
    
    why add "(" ?


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

Reply via email to