drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinfengni <...@git.apache.org>
Subject [GitHub] drill issue #517: DRILL-4704 fix
Date Thu, 04 Aug 2016 20:06:03 GMT
Github user jinfengni commented on the issue:

    > I attached debugger to Drill and found it's passing through line 172 (not 315-316)
of ExpressionTreeMaterializer.java, and that the "toType" object is one of those runtime generated
ones (name like TypeProtos$MajorType@8570).  Rather than attempt to change that code, I made
another change to CastIntDecimal.java which avoids repeated calculation of the precision when
it is already provided.  Please review.
    Line 172 was called after scale/precision are set on line 315-316.
    I understand your new change will kick in when the passed precision= 0. However, I still
think that the right way is to pass in the correct scale/precision when call that cast function,
in stead of figuring out on-the-fly in the middle of that function.  If someone pass a 0 precision
(which is not right), we need fix that in the place where 0 precision is specified.
    Also, will your code work correct for negative integer input?

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.

View raw message