You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by Jay357089 <gi...@git.apache.org> on 2016/08/22 12:26:39 UTC

[GitHub] incubator-carbondata pull request #83: [WIP]ColDict and All Dictionary shoul...

GitHub user Jay357089 opened a pull request:

    https://github.com/apache/incubator-carbondata/pull/83

    [WIP]ColDict and All Dictionary should not be used together

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Jay357089/incubator-carbondata coldict_AllDict

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-carbondata/pull/83.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #83
    
----
commit c4663c0f55cdba43a766e4a9f9d14b511876293c
Author: Jay357089 <li...@huawei.com>
Date:   2016-08-22T12:19:06Z

    colDict_Alldict

----


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

[GitHub] incubator-carbondata pull request #83: [CARBONDATA-169]ColDict and All Dicti...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/83#discussion_r75861773
  
    --- Diff: integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala ---
    @@ -205,6 +205,20 @@ class ExternalColumnDictionaryTestCase extends QueryTest with BeforeAndAfterAll
           loadSqlRelation, "deviceInformationId", "10086")
       }
     
    +  test("COLUMNDICT and ALL_DICTIONARY_PATH can not be used together") {
    +    try {
    +      sql(s"""
    +        LOAD DATA LOCAL INPATH "$complexFilePath1" INTO TABLE loadSqlTest
    +        OPTIONS('COLUMNDICT'='$extColDictFilePath1',"ALL_DICTIONARY_PATH"='$extColDictFilePath1')
    +        """)
    +      assert(false)
    --- End diff --
    
    write assert(false) here is just to make sure that flow goes to catch part, you know, if not go to catch part, then test case should fail. ...i think it is necessary...


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

[GitHub] incubator-carbondata pull request #83: [CARBONDATA-169]ColDict and All Dicti...

Posted by manishgupta88 <gi...@git.apache.org>.
Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/83#discussion_r75860680
  
    --- Diff: integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala ---
    @@ -205,6 +205,20 @@ class ExternalColumnDictionaryTestCase extends QueryTest with BeforeAndAfterAll
           loadSqlRelation, "deviceInformationId", "10086")
       }
     
    +  test("COLUMNDICT and ALL_DICTIONARY_PATH can not be used together") {
    +    try {
    +      sql(s"""
    +        LOAD DATA LOCAL INPATH "$complexFilePath1" INTO TABLE loadSqlTest
    +        OPTIONS('COLUMNDICT'='$extColDictFilePath1',"ALL_DICTIONARY_PATH"='$extColDictFilePath1')
    +        """)
    +      assert(false)
    --- End diff --
    
    assert(false) is not required as Load command will throw an exception and control will go to exception block


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

[GitHub] incubator-carbondata pull request #83: [CARBONDATA-169]ColDict and All Dicti...

Posted by manishgupta88 <gi...@git.apache.org>.
Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/83#discussion_r75860533
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala ---
    @@ -1001,6 +1001,12 @@ class CarbonSqlParser()
           "SERIALIZATION_NULL_FORMAT",
           "ALL_DICTIONARY_PATH"
         )
    +    if (options.exists(_._1.equalsIgnoreCase("COLUMNDICT")) &&
    +      options.exists(_._1.equalsIgnoreCase("ALL_DICTIONARY_PATH"))) {
    +      val errorMessage = "Error: COLUMNDICT and ALL_DICTIONARY_PATH can not be used together" +
    +        " in options"
    +      throw new MalformedCarbonCommandException(errorMessage)
    +    }
    --- End diff --
    
    @Jay357089 .....Move this newly added code below if loop for not isSupported check. I think ideally first we should validate the options whether they are among the ones allowed for load command and then perform other checks.


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

[GitHub] incubator-carbondata pull request #83: [CARBONDATA-169]ColDict and All Dicti...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/83#discussion_r75865720
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala ---
    @@ -1001,6 +1001,12 @@ class CarbonSqlParser()
           "SERIALIZATION_NULL_FORMAT",
           "ALL_DICTIONARY_PATH"
         )
    +    if (options.exists(_._1.equalsIgnoreCase("COLUMNDICT")) &&
    +      options.exists(_._1.equalsIgnoreCase("ALL_DICTIONARY_PATH"))) {
    +      val errorMessage = "Error: COLUMNDICT and ALL_DICTIONARY_PATH can not be used together" +
    +        " in options"
    +      throw new MalformedCarbonCommandException(errorMessage)
    +    }
    --- End diff --
    
    done


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

[GitHub] incubator-carbondata pull request #83: [CARBONDATA-169]ColDict and All Dicti...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-carbondata/pull/83


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

[GitHub] incubator-carbondata pull request #83: [CARBONDATA-169]ColDict and All Dicti...

Posted by manishgupta88 <gi...@git.apache.org>.
Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/83#discussion_r75865451
  
    --- Diff: integration/spark/src/test/scala/org/apache/carbondata/spark/util/ExternalColumnDictionaryTestCase.scala ---
    @@ -205,6 +205,20 @@ class ExternalColumnDictionaryTestCase extends QueryTest with BeforeAndAfterAll
           loadSqlRelation, "deviceInformationId", "10086")
       }
     
    +  test("COLUMNDICT and ALL_DICTIONARY_PATH can not be used together") {
    +    try {
    +      sql(s"""
    +        LOAD DATA LOCAL INPATH "$complexFilePath1" INTO TABLE loadSqlTest
    +        OPTIONS('COLUMNDICT'='$extColDictFilePath1',"ALL_DICTIONARY_PATH"='$extColDictFilePath1')
    +        """)
    +      assert(false)
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-carbondata pull request #83: [CARBONDATA-169]ColDict and All Dicti...

Posted by Jay357089 <gi...@git.apache.org>.
Github user Jay357089 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/83#discussion_r75861269
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala ---
    @@ -1001,6 +1001,12 @@ class CarbonSqlParser()
           "SERIALIZATION_NULL_FORMAT",
           "ALL_DICTIONARY_PATH"
         )
    +    if (options.exists(_._1.equalsIgnoreCase("COLUMNDICT")) &&
    +      options.exists(_._1.equalsIgnoreCase("ALL_DICTIONARY_PATH"))) {
    +      val errorMessage = "Error: COLUMNDICT and ALL_DICTIONARY_PATH can not be used together" +
    +        " in options"
    +      throw new MalformedCarbonCommandException(errorMessage)
    +    }
    --- End diff --
    
    OK. i will move


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