Skip to content

[SPARK-11827][SQL] Fix compilation against Java 7#13233

Closed
ted-yu wants to merge 1 commit into
apache:masterfrom
ted-yu:master
Closed

[SPARK-11827][SQL] Fix compilation against Java 7#13233
ted-yu wants to merge 1 commit into
apache:masterfrom
ted-yu:master

Conversation

@ted-yu

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

Copy link
Copy Markdown

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

rxin commented May 20, 2016

Copy link
Copy Markdown
Contributor

@srowen are you saying this fix is not sufficient?

@srowen

srowen commented May 20, 2016

Copy link
Copy Markdown
Member

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

@ted-yu

ted-yu commented May 20, 2016

Copy link
Copy Markdown
Author

Should reflection be used :-)

@srowen

srowen commented May 20, 2016

Copy link
Copy Markdown
Member

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

SparkQA commented May 20, 2016

Copy link
Copy Markdown

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