DMN 1.4 - scales #607
Replies: 3 comments
-
According to DMN spec, Section 10.3.2.3.1 number
Looks obvious to me the tests should match the setScale() method for BigDecimal with MathContext DECIMAL 128. I think the same behavior as java BigDecimal can be achieved in Python by using decimal.Decimal. I have identical negative scale tests running both on Java and Python. |
Beta Was this translation helpful? Give feedback.
-
According to this https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html the scale is a 32 bit signed integer. Hence, the tests that cover overflow / underflow of scale should use the -2,147,483,648 and 2,147,483,647. |
Beta Was this translation helpful? Give feedback.
-
Following our discussion today, I created two DMN issues to cover the scale issues: |
Beta Was this translation helpful? Give feedback.
-
Hey all, with the DMN 1.4 PRs here now, there are quite a number that deal with numeric scales.
Admittedly, my understanding of how we're supposed to handle negative scales is pretty patchy. Hence leaving off tests until I / we all have an understanding. TBH, it is not is much "what is a negative scale", that is okay. More like, "how to transition between scales when a negitve is involved". Debugging through the Java BigDecimal code is is not straight forward at all.
So, opening up a discussion here so we can all understand better.
First helpful comment is by @opatrascoiu here: #592 (comment). :-)
Beta Was this translation helpful? Give feedback.
All reactions