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