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 Wed, 03 Aug 2016 23:17:55 GMT
Github user jinfengni commented on the issue:

    I agreed with Aman that the eval() of CastIntDecimal28Sparse() should not ignore the specified
scale/precision, if they are passed as parameters. 
    As you analyzed, the problem is the scale/precision is 0 for a int constant value, which
is not right. We should fix place where scale/precision is specified wrongly.  Ignoring scale/precision
and re-calcualting them in eval() means Drill has to apply that logic per input row.
    The reason that you saw eval() is called only once:
    Filter employee_id = 170, 
      is   employee_id = castIntDecimal28Sparse(170, scale, precision). // scale and precision
is wrongly 0.
    Since RHS is a constant, Drill will evaluate only once, even you have multiple rows. However,
this is not true, if it's not a constant expression. 
    To me, you point to the right cause of the problem. But we need get better place to apply
the fix ( not in eval() ) method. 
    The place where we get scale/precision as 0 

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