Skip to content

Add value precision workaround to README.md - #13

Open
hqm42 wants to merge 1 commit into
ankane:masterfrom
hqm42:patch-1
Open

Add value precision workaround to README.md#13
hqm42 wants to merge 1 commit into
ankane:masterfrom
hqm42:patch-1

Conversation

@hqm42

@hqm42 hqm42 commented Nov 7, 2023

Copy link
Copy Markdown

I encountered rounding errors while summing up large numbers with rollup:

[1] pry(main)> MyModel.rollup('my rollup') { |r| r.sum(:my_int_column) }
[2] pry(main)> Rollup.series('my rollup').values.sum == MyModel.pluck(:my_int_column).sum
=> false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant