Would it be better if I add an extra check in the evaluate method like this:
<pre>
<code>
 if(children.get(0).evaluate(tuple, ptr) && children.get(0).getDataType() == PDataType.DECIMAL ) {
........
 }
</code>
</pre>