You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by manishgupta88 <gi...@git.apache.org> on 2017/12/27 17:40:14 UTC

[GitHub] carbondata pull request #1732: [WIP] Fixed select query failure after alter ...

GitHub user manishgupta88 opened a pull request:

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

    [WIP] Fixed select query failure after alter change data type operation for dictionary exclude columns

    Fixed select query failure after alter change data type operation for dictionary exclude columns
    
    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
    
     - [ ] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
    


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

    $ git pull https://github.com/manishgupta88/carbondata select_ater_change_datatype_fix

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

    https://github.com/apache/carbondata/pull/1732.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 #1732
    
----
commit 31baf92318a033e0ea2fba06f4cc94dc38146770
Author: manishgupta88 <to...@...>
Date:   2017-12-27T17:39:58Z

    Handle select query failure after alter change data tye operation for dictionary exclude columns

----


---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

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



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2655/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1315/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

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



---

[GitHub] carbondata pull request #1732: [CARBONDATA-1946] Exception thrown after alte...

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

    https://github.com/apache/carbondata/pull/1732#discussion_r159461116
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java ---
    @@ -775,4 +775,25 @@ public static DataType valueOf(String name) {
         }
       }
     
    -}
    \ No newline at end of file
    +  /**
    +   * Method to type case the data based on modified data type. This method will used for
    +   * retrieving the data after change in data type restructure operation
    +   *
    +   * @param data
    +   * @param restructuredDataType
    +   * @param currentDataOffset
    +   * @param length
    +   * @return
    +   */
    +  public static long getDataBasedOnRestructuredDataType(byte[] data, DataType restructuredDataType,
    --- End diff --
    
    This case won't exist from short to int or float to double?. Here I can see handling only for INT to LONG


---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1245/



---

[GitHub] carbondata pull request #1732: [CARBONDATA-1946] Exception thrown after alte...

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

    https://github.com/apache/carbondata/pull/1732#discussion_r159589346
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/scan/result/vector/CarbonColumnVector.java ---
    @@ -67,6 +67,20 @@
     
       DataType getType();
     
    +  /**
    +   * Method to be used for getting the restructured data type. This method will used for
    +   * retrieving the data after change in data type restructure operation
    +   *
    +   * @return
    +   */
    +  DataType getRestructuredType();
    --- End diff --
    
    Better rename as BlockDataType to give more meaning ful


---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1236/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2469/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

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



---

[GitHub] carbondata issue #1732: [WIP] Fixed select query failure after alter change ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1148/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1230/



---

[GitHub] carbondata issue #1732: [WIP] Fixed select query failure after alter change ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

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



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1174/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

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



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1177/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

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



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

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



---

[GitHub] carbondata pull request #1732: [CARBONDATA-1946] Exception thrown after alte...

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

    https://github.com/apache/carbondata/pull/1732#discussion_r159585172
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java ---
    @@ -775,4 +775,25 @@ public static DataType valueOf(String name) {
         }
       }
     
    -}
    \ No newline at end of file
    +  /**
    +   * Method to type case the data based on modified data type. This method will used for
    +   * retrieving the data after change in data type restructure operation
    +   *
    +   * @param data
    +   * @param restructuredDataType
    +   * @param currentDataOffset
    +   * @param length
    +   * @return
    +   */
    +  public static long getDataBasedOnRestructuredDataType(byte[] data, DataType restructuredDataType,
    --- End diff --
    
    yes because alter datatype change is only for Int to BigInt and decimal from lower precision to higher precision. So float to double case is not required to be handled


---

[GitHub] carbondata pull request #1732: [CARBONDATA-1946] Exception thrown after alte...

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

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


---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2649/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by manishgupta88 <gi...@git.apache.org>.
Github user manishgupta88 commented on the issue:

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


---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1252/



---

[GitHub] carbondata issue #1732: [WIP] Fixed select query failure after alter change ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1163/



---

[GitHub] carbondata pull request #1732: [CARBONDATA-1946] Exception thrown after alte...

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

    https://github.com/apache/carbondata/pull/1732#discussion_r159461589
  
    --- Diff: integration/spark2/src/test/scala/org/apache/spark/carbondata/restructure/vectorreader/ChangeDataTypeTestCases.scala ---
    @@ -164,6 +164,21 @@ class ChangeDataTypeTestCases extends Spark2QueryTest with BeforeAndAfterAll {
         sql("drop table if exists PreAggMain_preagg1")
       }
     
    +  test("test data type change for dictionary exclude INT type column") {
    --- End diff --
    
    PLease add tests for short to int, short to long and float to double also


---

[GitHub] carbondata pull request #1732: [CARBONDATA-1946] Exception thrown after alte...

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

    https://github.com/apache/carbondata/pull/1732#discussion_r159585515
  
    --- Diff: integration/spark2/src/test/scala/org/apache/spark/carbondata/restructure/vectorreader/ChangeDataTypeTestCases.scala ---
    @@ -164,6 +164,21 @@ class ChangeDataTypeTestCases extends Spark2QueryTest with BeforeAndAfterAll {
         sql("drop table if exists PreAggMain_preagg1")
       }
     
    +  test("test data type change for dictionary exclude INT type column") {
    --- End diff --
    
    Alter table datatype change does not support short to int, short to long and float to double. It only supports Int to BigInt and decimal from lower precision to higher precision. If any other data type change request comes validation is done and exception is thrown


---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2704/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2648/



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

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



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    LGTM


---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1732
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2476/



---

[GitHub] carbondata issue #1732: [WIP] Fixed select query failure after alter change ...

Posted by CarbonDataQA <gi...@git.apache.org>.
Github user CarbonDataQA commented on the issue:

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



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by ravipesala <gi...@git.apache.org>.
Github user ravipesala commented on the issue:

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



---

[GitHub] carbondata issue #1732: [CARBONDATA-1946] Exception thrown after alter data ...

Posted by manishgupta88 <gi...@git.apache.org>.
Github user manishgupta88 commented on the issue:

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


---

[GitHub] carbondata issue #1732: [WIP] Fixed select query failure after alter change ...

Posted by akashrn5 <gi...@git.apache.org>.
Github user akashrn5 commented on the issue:

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


---