Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-1600

Exact numeric issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.0
    • 6.0.0
    • Query Engine
    • None
    • Documentation (Ref Guide, User Guide, etc.), Release Notes, Compatibility/Configuration

      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).

            rhn-engineering-shawkins Steven Hawkins
            rhn-engineering-shawkins Steven Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: