[
https://issues.apache.org/jira/browse/DRILL-7887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17309954#comment-17309954
]
ASF GitHub Bot commented on DRILL-7887:
---------------------------------------
vvysotskyi opened a new pull request #2193:
URL: https://github.com/apache/drill/pull/2193
# [DRILL-7887](https://issues.apache.org/jira/browse/DRILL-7887): JDBC
plugin returns incorrect precision for SUM(DECIMAL) queries
## Description
Made changes to return DRILL_REL_DATATYPE_SYSTEM.getMaxNumericScale() and
DRILL_REL_DATATYPE_SYSTEM.getMaxNumericPrecision() for the case when JDBC
calculated presision is greater to avoid errors in Drill.
Also, added a check for actual value scale and precision to avoid returning
incorrect values.
## Documentation
NA
## Testing
Added unit test to check the desired behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> JDBC plugin returns incorrect precision for SUM(DECIMAL) queries
> ----------------------------------------------------------------
>
> Key: DRILL-7887
> URL: https://issues.apache.org/jira/browse/DRILL-7887
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.19.0
> Reporter: Vova Vysotskyi
> Assignee: Vova Vysotskyi
> Priority: Major
> Fix For: 1.19.0
>
>
> The following query:
> {code:sql}
> SELECT sum(decimal_field * smallint_field) AS `order_total`
> FROM mysql.`drill_mysql_test`.person e
> {code}
> returns {{order_total}} field with {{DECIMAL(42, 2)}} type, but Drill
> supports max presision of 38.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)