[
https://issues.apache.org/jira/browse/DRILL-1737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacques Nadeau resolved DRILL-1737.
-----------------------------------
Resolution: Fixed
Resolved in 116e4dc
> Decimal type scale and precision are being flipped sometime during a cast
> -------------------------------------------------------------------------
>
> Key: DRILL-1737
> URL: https://issues.apache.org/jira/browse/DRILL-1737
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Jason Altekruse
> Assignee: Jason Altekruse
> Fix For: 0.7.0
>
>
> Running this query I was trying to test the behavior of the test framework to
> allow checking a baseline file, without providing type information for each
> column in a csv. The idea is that the types that come out of the test query
> can drive the interpretation of the baseline where strict type checking isn't
> necessary. Unfortunately I ran into a bug when I was trying to make sure
> decimal scale and precision could be retrieved from a result set with a
> decimal column. It appears that the two values are being switched somewhere
> in the process of running a cast. I plan on fixing this soon, but wanted to
> create a JIRA to track the issue so I can post the patch for the test
> framework for review.
> To replicate:
> select cast(dec_col as decimal(38,2)) dec_col from
> cp.`testframework/decimal_test.json`
> The file need only contain a single decimal in a field called dec_col in the
> input file. I used a value of "3.7"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)