Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Make sure any Fixnum returned by a DB sum is type cast to a Float before standard converstion to a BigDecimal.

#1368

My apologies. Ticket #1346 Coerce 0 Average Calculation To Float is incomplete. "Some" DBs will return Fixnum values for an average. This fix which is now tested does everything correctly. FYI, this is only one of a few things we really need done to get the latest SQL Server adapter passing all AR tests. Thanks!

Reported by Ken Collins · November 13th, 2008 @ 04:01 PM

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. josh
    josh
    • Milestone cleared.
    • State changed from new to open

    November 13th, 2008 @ 04:37 PM

  2. josh
    josh

    You're making me look bad :)

    November 13th, 2008 @ 04:40 PM

  3. Ken Collins
    Ken Collins

    Sigh.... sorry about that. I just figured you needed a Rock Band break :)

    In all honesty, I never saw the other errors because in my first patch I just grossly converted whatever value to a Float before the BigDecimal conversion. I think this is the best of both now as it is explicit and tested from an interface perspective... hence not coupled to any DB implementation.

    Cheers!

    November 13th, 2008 @ 04:50 PM

  4. josh
    josh
    • State changed from open to resolved

    Yeah, no problem. Committed.

    November 13th, 2008 @ 04:57 PM