drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill issue #517: DRILL-4704 fix
Date Fri, 05 Aug 2016 22:00:53 GMT
Github user paul-rogers commented on the issue:

    https://github.com/apache/drill/pull/517
  
    Hi Dave,
    
    I agree that Drill Decimal support clearly needs attention. I'm expermenting with adjusting
the template code to at least generate a meaningful conversion for all int x decimal types
when the values fit.
    
    Looks like current behavior will be that if we convert an int that is too large for a
scale of 0, we won't adjust the scale. That is, if we always leave scale=0, then we'll do
the following obviously wrong converstion:
    
    big int: 123,456,789,012
    Dec 9: 456,789,012
    
    We want a scale of 3, so that the answer is:
    
    Dec 9: 123,456,789,000
    
    And, of course, we should round the least significant digit, which it seems we don't do.
    
    So, our fix will work only for the simple case, not for the more complex case.
    
    We could leverage your fix to properly set the scale as well as the precision.


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

Mime
View raw message