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

[GitHub] carbondata pull request #1236: fixed bug for fetching the error value of dec...

GitHub user steven-qin opened a pull request:

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

    fixed bug for fetching the error value of decimal type in presto

    The following is based on TPCH test.
    create statement:
                create table lineitem (l_orderkey int ,l_partkey int ,l_suppkey int ,l_linenumber int ,l_quantity decimal(15,2) ,l_extendedprice decimal(15,2) ,l_discount decimal(15,2) ,l_tax decimal(15,2) ,l_returnflag string ,l_linestatus string ,l_shipdate date ,l_commitdate date ,l_receiptdate date ,l_shipinstruct string ,l_shipmode string ,l_comment string ) stored by 'carbondata'
    
    query sql:
             select l_quantity,l_extendedprice,l_discount,l_tax  from lineitem where l_orderkey=15413986 and l_linenumber=7;
    
    The below is correct in spark:
    l_quantity |  l_extendedprice | l_discount | l_tax
    11.00        |       16549.17       |      0.07     |  0.04
    
    The below is wrong in presto:
    l_quantity |  l_extendedprice |  l_discount | l_tax
    0.11          |  165.49                |  0.00          | 0.00
    
    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [ ] Make sure the PR title is formatted like:
       `[CARBONDATA-<Jira issue #>] Description of pull request`
     - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [ ] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
     - [ ] Testing done
     
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            - What manual testing you have done?
            - 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/linqer/carbondata fixed-bug-ErrorDecimalTypeValue

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

    https://github.com/apache/carbondata/pull/1236.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 #1236
    
----
commit b449a85107d630e070f053b9357dfc4da836d8c9
Author: yuyu7972 <39...@qq.com>
Date:   2017-08-04T15:07:10Z

    fixed bug for fetching the error value of decimal type in presto
    
    The following is based on TPCH test.
    create statement:
                create table lineitem (l_orderkey int ,l_partkey int ,l_suppkey int ,l_linenumber int ,l_quantity decimal(15,2) ,l_extendedprice decimal(15,2) ,l_discount decimal(15,2) ,l_tax decimal(15,2) ,l_returnflag string ,l_linestatus string ,l_shipdate date ,l_commitdate date ,l_receiptdate date ,l_shipinstruct string ,l_shipmode string ,l_comment string ) stored by 'carbondata'
    
    query sql:
             select l_quantity,l_extendedprice,l_discount,l_tax  from lineitem where l_orderkey=15413986 and l_linenumber=7;
    
    The below is correct in spark:
    l_quantity |  l_extendedprice | l_discount | l_tax
    11.00        |       16549.17       |      0.07     |  0.04
    
    The below is wrong in presto:
    l_quantity |  l_extendedprice |  l_discount | l_tax
    0.11          |  165.49                |  0.00          | 0.00

----


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    @bhavya411 
    I has removed the extra import " import com.google.common.base.Strings;". Please check it again.


---
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] carbondata issue #1236: [CARBONDATA-1392]Fixed bug for fetching the error va...

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

    https://github.com/apache/carbondata/pull/1236
  
    SDV Build Success with Spark 2.1, Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/246/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/3376/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    SDV Build Success with Spark 2.1, Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/202/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    SDV Build Success with Spark 2.1, Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/137/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/778/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/808/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Can one of the admins verify this patch?


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    @anubhav100 
    The lastest master branch:
    create statement: carbon.sql("create table partsupp2 ( ps_partkey int ,ps_suppkey int ,ps_availqty int , ps_supplycost decimal(15,2) ,ps_comment string ) stored by 'carbondata'")
    load statement: carbon.sql("LOAD DATA INPATH '/testdata/partsupp2.csv' INTO TABLE partsupp2  OPTIONS('DELIMITER'='\u0001')")
    
    sql: select * from partsupp2;
    
     ps_partkey | ps_suppkey | ps_availqty | ps_supplycost |                                                                                            ps_comment                               
    ------------+------------+-------------+---------------+-------------------------------------------------------------------------------------------------------------------------------------
              1 |          2 |        3325 | 7.72          | , even theodolites. regular, final theodolites eat after the carefully pending foxes. furiously regular deposits sleep slyly. carefu
          75001 |          2 |        8893 | 1.80          | . blithely regular platelets sleep fluffily ironic, regular platelets. slyly regular deposits nag. packages are furiously according 
    	
    
    in spark-shell:
    
    sql: carbon.sql("select * from partsupp2").show
    +----------+----------+-----------+-------------+--------------------+
    |ps_partkey|ps_suppkey|ps_availqty|ps_supplycost|          ps_comment|
    +----------+----------+-----------+-------------+--------------------+
    |         1|         2|       3325|       771.64|, even theodolite...|
    |     75001|         2|       8893|       179.82|. blithely regula...|
    +----------+----------+-----------+-------------+--------------------+
    
    	
    The pr-1236 branch:
    
    git fetch origin pull/1236/head:pr-1236
    
    sql: select * from partsupp2;
    
    ps_partkey | ps_suppkey | ps_availqty | ps_supplycost |                                                                                            ps_comment                               
    ------------+------------+-------------+---------------+-------------------------------------------------------------------------------------------------------------------------------------
              1 |          2 |        3325 | 771.64        | , even theodolites. regular, final theodolites eat after the carefully pending foxes. furiously regular deposits sleep slyly. carefu
          75001 |          2 |        8893 | 179.82        | . blithely regular platelets sleep fluffily ironic, regular platelets. slyly regular deposits nag. packages are furiously according 
    



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    SDV Build Success with Spark 2.1, Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/214/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Build Success with Spark 1.6, Please check CI http://144.76.159.231:8080/job/ApacheCarbonPRBuilder/812/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    @steven-qin this pr has resolved this issue with more optimizations #1257 


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    SDV Build Failed with Spark 2.1, Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/134/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/3407/



---
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] carbondata pull request #1236: [CARBONDATA-1392]Fixed bug for fetching the e...

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

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


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    @chenliang sure he has done a great job


---
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] carbondata issue #1236: [CARBONDATA-1392]Fixed bug for fetching the error va...

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

    https://github.com/apache/carbondata/pull/1236
  
    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.
---

[GitHub] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    @anubhav100 i prefer to using steven-qin's pull request, because steven-qin fix it earlier.


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    @anubhav100 
    There is not carbondata issue No.



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Can one of the admins verify this patch?


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    SDV Build Success with Spark 2.1, Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/212/



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Can one of the admins verify this patch?


---
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] carbondata issue #1236: [CARBONDATA-1392]Fixed bug for fetching the error va...

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

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


---
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] carbondata issue #1236: [CARBONDATA-1392]Fixed bug for fetching the error va...

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

    https://github.com/apache/carbondata/pull/1236
  
    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.
---

[GitHub] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

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


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Can one of the admins verify this patch?


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    @steven-qin
    1.please correct your PR title as per : https://github.com/apache/carbondata/blob/master/docs/How-to-contribute-to-Apache-CarbonData.md
    2.there is still problem with decimal type i tried to run this query in both carbon data and presto from your branch and presto  is giving wrong results
    
    in carbon-----
    
    carbon.sql("select l_tax from lineitem where l_tax=0.06").show()
        carbon.stop()
    
    +-----+
    |l_tax|
    +-----+
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    | 0.06|
    +-----+
    only showing top 20 rows
    
    when i execute it in presto 
    
    select l_tax from lineitem where l_tax=0.06;
    
    i get no result 



---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    verified


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    add to whitelist


---
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] carbondata issue #1236: fixed bug for fetching the error value of decimal ty...

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

    https://github.com/apache/carbondata/pull/1236
  
    Hi @steven-qin  can you please remove the extra import " import com.google.common.base.Strings;" from CarbondataRecordCursor. I have verified the PR for both LongDecimalType and ShortDecimalType and it is working fine.


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