Bug 781150 - Exact numeric issues
Summary: Exact numeric issues
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: Tooling, EDS
Version: 5.2.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Van Halbert
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-01 02:13 UTC by Steven Hawkins
Modified: 2012-07-13 04:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: SOA-3649
Environment:
Last Closed: 2011-12-07 22:44:52 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-3649 0 None None None Never

Description Steven Hawkins 2011-12-01 02:13:42 UTC
++ This bug is a clone of bug 781149 ++

Affects: Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration, Release Notes
project_key: SOA

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

Comment 1 Van Halbert 2011-12-01 02:13:42 UTC
Link: Added: This issue Cloned from TEIID-1600


Comment 2 Van Halbert 2011-12-01 02:17:16 UTC
Release Notes Text: Added: 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.
Security: Added: Public


Comment 4 Van Halbert 2011-12-07 22:44:52 UTC
Date: 2011-11-30 21:03:44 -0500 (Wed, 30 Nov 2011)
New Revision: 3711

Modified:
  trunk/build/kits/jboss-container/teiid-releasenotes.html
  trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-c.xml
trunk/engine/src/main/java/org/teiid/query/parser/SQLParserUtil.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/AggregateSymbol.java  trunk/engine/src/main/javacc/org/teiid/query/parser/SQLParser.jj
Log:
TEIID-1600 allowing backward compatibility to work with avg as well



Note You need to log in before you can comment on or make changes to this bug.