Issue with criteria on a bigdecimal data type column in MetaMatrix

Solution Verified - Updated -

Environment

  • MetaMatrix Enterprise Server 5.5.3
  • Text File Data Source

  • Columns of bigdecimal data type in source

Issue

  • The values in my data source are in the format of  0.000000. When I run a query with criteria of "where COLUMN=0" it returns no results.
  • If I use "where COLUMN='0.000000'" I receive results.
  • Why doesn't 0 match 0.000000?

Resolution

There are issues with java.math.bigdecimal, it performs a string comparison not a numeric comparison.  To resolve this issue, change the datatype of the column in your Metamatrix physical model to double instead of bigdecimal.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments