Skip to content

Conversation

@ted-yu
Copy link

@ted-yu ted-yu commented May 20, 2016

What changes were proposed in this pull request?

This PR fixes compilation error against Java 7:

sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala:137: value longValueExact is not a member of java.math.BigInteger
[ERROR]       this.longVal = bigintval.longValueExact()
[ERROR]                                ^
[ERROR] one error found

How was this patch tested?

Existing tests.

@rxin
Copy link
Contributor

rxin commented May 20, 2016

@srowen are you saying this fix is not sufficient?

@srowen
Copy link
Member

srowen commented May 20, 2016

Yes, this fails to check that the value fits in a long and will silently truncate.

@ted-yu
Copy link
Author

ted-yu commented May 20, 2016

Should reflection be used :-)

@srowen
Copy link
Member

srowen commented May 20, 2016

No, it's as simple as the fix in #13223 This PR should be closed.

@ted-yu ted-yu closed this May 20, 2016
@SparkQA
Copy link

SparkQA commented May 20, 2016

Test build #59028 has finished for PR 13233 at commit 422ccad.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

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.

5 participants