Skip to content

Conversation

@superbobry
Copy link

@superbobry superbobry commented Apr 20, 2017

This commit works around a bug in BigDecimal.equals in Scala 2.10 which fails comparisons with doubles, e.g. BigDecimal(1.1) == 1.1 is false in Scala 2.10, but true in Scala 2.11.

See scala/scala@29541c for details.


An alternative way to implement this is to create separate 2.10 and 2.11 files. I've decided not to do it because the cause of the failures (apart from the whitespace diff) is a known bug in 2.10 BigDecimal.

This commit works around a bug in [[BigDecimal.equals]] in Scala 2.10
which fails comparisons with doubles, e.g. BigDecimal(1.1) == 1.1 is
false in Scala 2.10, but true in Scala 2.11.

See scala/scala@29541c for details.
Copy link

@ashangit ashangit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashangit
Copy link

Could you just add a tag in the title so we do not forgot to revert it once we will migrate to scala 2.11?
Somethink like [CRITEO - Scala 2.10 Fix]

@superbobry superbobry changed the title Fixed BigDecimal related tests [CRITEO - Scala 2.10 Fix] Fixed BigDecimal related tests Apr 24, 2017
@superbobry superbobry merged commit d85a16e into criteo-2.1 Apr 24, 2017
@Willymontaz Willymontaz deleted the big-decimal-fix branch April 2, 2019 15:06
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.

3 participants