Uploaded image for project: 'JBoss Enterprise SOA Platform'
  1. JBoss Enterprise SOA Platform
  2. SOA-3649

Exact numeric issues

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • 5.2.0 GA
    • 6.0.0 GA
    • EDS, Tooling
    • None
    • Documentation (Ref Guide, User Guide, etc.), Release Notes, Compatibility/Configuration
    • This will be a change to bring Teiid in line with the SQL spec in how it parses exact numeric values and return values from the AVG aggregate. In some situations this will require that vdbs be rebuilt with explicit conversions added in view layers.

    Description

      Teiid diverges from the SQL spec by parsing numerical expressions of the form <integral value>.<integral value> as doubles rather than as an exact numeric type (which for us would be BigDecimal). I believe this was originally done to match Java parsing semantics and potentially to avoid performance overhead of using BigBecimal. However this can lead to a loss of precision that is not expected by ANSI SQL.

      inexact numeric values entered in scientific notation would not be affected by this change. They would still be parsed as doubles.

      The SQL spec also requires that the result of AVG on an exact type be returned as an exact type (although precision and scale are implementation dependent).

      Attachments

        Issue Links

          Activity

            People

              van.halbert Van Halbert (Inactive)
              rhn-engineering-shawkins Steven Hawkins
              Archiver:
              ranumula@redhat.com Raju Anumula

              Dates

                Created:
                Updated:
                Resolved:
                Archived: