IBM Support

IC69031: STATISTICAL AND REGRESSION AGGREGATE FUNCTIONS SHOULD RETURN DECFLOAT IN NUMBER COMPATIBILITY MODE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In NUMBER compatibility mode, the following statistical and
    regression functions incorrectly return INTEGER, BIGINT or
    DOUBLE where they should return DECFLOAT.  'integer' below means
    SMALLINT, INTEGER or BIGINT:
    
      AVG( SMALLINT or INTEGER ) returns INTEGER
      AVG( BIGINT ) returns BIGINT
      CORRELATION ( either argument is integer ) returns DOUBLE
      COVARIANCE( either argument is integer ) returns DOUBLE
      STDDEV( integer ) returns DOUBLE
      VARIANCE( integer ) returns DOUBLE
      REGR_SLOPE( either argument is integer ) returns DOUBLE
      REGR_ICPT( either argument is integer ) returns DOUBLE
      REGR_INTERCEPT( either argument is integer ) returns DOUBLE
      REGR_R2( either argument is integer ) returns DOUBLE
      REGR_AVGX( ..., integer ) returns DOUBLE
      REGR_AVGY( integer, ... ) returns DOUBLE
      REGR_SXX( ..., integer ) returns DOUBLE
      REGR_SYY( integer, ... ) returns DOUBLE
      REGR_SXY( either argument is integer ) returns DOUBLE
    

Local fix

  • Cast the function argument(s) to DECFLOAT.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * In NUMBER compatibility mode, the following statistical and  *
    *                                                              *
    * regression functions incorrectly return INTEGER, BIGINT or   *
    *                                                              *
    * DOUBLE where they should return DECFLOAT.  'integer' below   *
    * means                                                        *
    * SMALLINT, INTEGER or BIGINT:                                 *
    *                                                              *
    *                                                              *
    *                                                              *
    * AVG( SMALLINT or INTEGER ) returns INTEGER                   *
    *                                                              *
    * AVG( BIGINT ) returns BIGINT                                 *
    *                                                              *
    * CORRELATION ( either argument is integer ) returns DOUBLE    *
    *                                                              *
    * COVARIANCE( either argument is integer ) returns DOUBLE      *
    *                                                              *
    * STDDEV( integer ) returns DOUBLE                             *
    *                                                              *
    * VARIANCE( integer ) returns DOUBLE                           *
    *                                                              *
    * REGR_SLOPE( either argument is integer ) returns DOUBLE      *
    *                                                              *
    * REGR_ICPT( either argument is integer ) returns DOUBLE       *
    *                                                              *
    * REGR_INTERCEPT( either argument is integer ) returns         *
    * DOUBLE                                                       *
    * REGR_R2( either argument is integer ) returns DOUBLE         *
    *                                                              *
    * REGR_AVGX( ..., integer ) returns DOUBLE                     *
    *                                                              *
    * REGR_AVGY( integer, ... ) returns DOUBLE                     *
    *                                                              *
    * REGR_SXX( ..., integer ) returns DOUBLE                      *
    *                                                              *
    * REGR_SYY( integer, ... ) returns DOUBLE                      *
    *                                                              *
    * REGR_SXY( either argument is integer ) returns DOUBLE        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 version 9.7 fix pack 3, or cast the function  *
    * argument(s) to DECFLOAT.                                     *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 version 9.7 fix pack 3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC69031

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-06-04

  • Closed date

    2010-09-23

  • Last modified date

    2010-09-23

  • APAR is sysrouted FROM one or more of the following:

    IC69009

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
23 September 2010