This project is archived and is in readonly mode.

#1368 ✓resolved
Ken Collins

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

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

My apologies. Ticket #1346 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!

Comments and changes to this ticket

  • josh

    josh November 13th, 2008 @ 04:37 PM

    • Milestone cleared.
    • State changed from “new” to “open”
  • josh

    josh November 13th, 2008 @ 04:40 PM

    You're making me look bad :)

  • Ken Collins

    Ken Collins November 13th, 2008 @ 04:50 PM

    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.


  • josh

    josh November 13th, 2008 @ 04:57 PM

    • State changed from “open” to “resolved”

    Yeah, no problem. Committed.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket