Details

Type: Bug

Status: Closed

Severity: Urgent

Resolution: Fixed

Affects Version/s: 8.2.0.3 GA, 8.2.0 GA, 8.3.0 GA

Fix Version/s: 9.0.0 GA

Component/s: Step

Labels:

Environment:# Environment
V8.2 environment
Pentaho version : 8.2.0.3
OS : Windows 10 Pro

Story Points:20

PDI Subcomponent:

Notice:

Sprint Team:Tatooine (Maint)

Steps to Reproduce:
Description
Use Case 1 : Multiplication
Using a calculator step for multiplying 2 values of datatype *BigNumber* will result in an incorrect result.
e.g.)
3 * 44 = 130 (Precision definition is 2 because 44 is 2 digits. The first 2 digits of 132 is rounded , then last 1 digit is rounded down. The result is 130.)
3 * 444 = 1330 (Precision definition is 3 because 444 is 3 digits. The first 3 digits of 1332 is rounded , then last 1 digit is rounded down. The result is 1330.)
99* 5 = 500 (Precision definition is 2 because 99 is 2 digits. The first 2 digits of 495 is rounded , then last 1 digit is rounded up. The result is 500.)
Result of calculation using BigNumber type is incorrect because of above reason.
Use Case 2 : Division
If Dividing 2 values of datatype "BigNumber", the calculated value is getting rounded off which would loose precision value. The other thing that I noticed was that the conversion Mask does not have any effect when datatype is BigNumber.
For Ex: Suppose Dividing 4389/1291, the output of Calculator Step is showing as 3.4. But the actual result that should be shown is 3.39969016(depending on the conversion mask). I am attaching the sample transformation(Calculator_Dividing_Numbers_BigNumber_datatype.ktr). I have attached a screencast for reference.
Attachments
Issue Links
 relates to

PDI17534 Multiplying BigNumbers in calculator loses precision
 Closed