You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kunal642 <gi...@git.apache.org> on 2017/04/09 09:10:47 UTC

[GitHub] incubator-carbondata pull request #771: [CARBONDATA-883] Fixed cast exceptio...

GitHub user kunal642 opened a pull request:

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

    [CARBONDATA-883] Fixed cast exception for integer data types in RestructureBasedVectorResultCollector

    The following issues are fixed in this PR:-
    1. In RestructureUtil, int and short datatypes were being parsed as long and then being cast to long which was throwing cast exception.
    
    2. Added an entry for SHORT in carbonKeywords because we were allowing the user to create a table with short datatype but alter table was failing due to missing SHORT keyword.
    Now short and smallInt are both acceptable and both will be converted to smallint.

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

    $ git pull https://github.com/kunal642/incubator-carbondata CARBONDATA-883

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

    https://github.com/apache/incubator-carbondata/pull/771.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 #771
    
----
commit 9db005af3022b2221eb8af1077f14a62075a76c3
Author: kunal642 <ku...@knoldus.in>
Date:   2017-04-07T13:26:16Z

    fixed cast exception for integer data types in RestructureBasedVectorResultCollector

commit 0be853c83a2ce81256a0c54c5fc9d27db6e8c9da
Author: kunal642 <ku...@knoldus.in>
Date:   2017-04-09T08:45:24Z

    added parser for short dataype

----


---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1547/



---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1546/



---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1527/



---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1533/



---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    @gvramana please review


---
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 #771: [CARBONDATA-883] Fixed cast exceptio...

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

    https://github.com/apache/incubator-carbondata/pull/771#discussion_r110643139
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/scan/collector/impl/RestructureBasedVectorResultCollector.java ---
    @@ -177,22 +177,25 @@ private void fillNoDictionaryData(CarbonColumnVector vector, ColumnVectorInfo co
       private void fillDataForNonExistingMeasures() {
         for (int i = 0; i < tableBlockExecutionInfos.getActualQueryMeasures().length; i++) {
           if (!measureInfo.getMeasureExists()[i]) {
    +        int queryOrder = tableBlockExecutionInfos.getActualQueryMeasures()[i].getQueryOrder();
             CarbonMeasure measure = tableBlockExecutionInfos.getActualQueryMeasures()[i].getMeasure();
    -        ColumnVectorInfo columnVectorInfo = allColumnInfo[i];
    -        CarbonColumnVector vector = allColumnInfo[i].vector;
    +        ColumnVectorInfo columnVectorInfo = allColumnInfo[queryOrder];
    +        CarbonColumnVector vector = columnVectorInfo.vector;
             Object defaultValue = RestructureUtil
                 .getMeasureDefaultValue(measure.getColumnSchema(), measure.getDefaultValue());
             if (null == defaultValue) {
               vector.putNulls(columnVectorInfo.vectorOffset, columnVectorInfo.size);
             } else {
               switch (measureInfo.getMeasureDataTypes()[i]) {
                 case SHORT:
    +              long shortValueAsLong = (long) defaultValue;
    --- End diff --
    
    1. Parsing string to Object should be done in constructor, so that it is done once.
    2. Filling should not do any type conversion, but should fill directly into vector.


---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1534/



---
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 #771: [CARBONDATA-883] Fixed cast exceptio...

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

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


---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    Build Failed  with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1545/



---
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 issue #771: [CARBONDATA-883] Fixed cast exception for i...

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

    https://github.com/apache/incubator-carbondata/pull/771
  
    LGTM


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