Skip to content

Conversation

@robbinspg
Copy link
Member

What changes were proposed in this pull request?

correct the expected type from Length function to be Int

How was this patch tested?

Test runs on little endian and big endian platforms

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

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

OK by me if @wzhfy is OK with it

values.count(_.isEmpty).toLong,
nonNullValues.map(_.length).sum / nonNullValues.length.toDouble,
nonNullValues.map(_.length).max.toLong,
nonNullValues.map(_.length).max.toInt,
Copy link
Member

Choose a reason for hiding this comment

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

Does it even need toInt? I would presume it's already an int, but not sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question, but at least it documents the type

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can keep toInt, it explicitly shows the type.

@wzhfy
Copy link
Contributor

wzhfy commented Oct 13, 2016

LGTM

@robbinspg
Copy link
Member Author

This PR contains a change to o.a.s.sql.hive.StatisticsSuite which I believe should fix that issue (awaiting big-endian build to complete)

@robbinspg
Copy link
Member Author

Tests all pass on big-endian with this PR

@SparkQA
Copy link

SparkQA commented Oct 13, 2016

Test build #66892 has finished for PR 15464 at commit 559c3b9.

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

@hvanhovell
Copy link
Contributor

Merging to master. Thanks!

@asfgit asfgit closed this in 84f149e Oct 13, 2016
robert3005 pushed a commit to palantir/spark that referenced this pull request Nov 1, 2016
## What changes were proposed in this pull request?
correct the expected type from Length function to be Int

## How was this patch tested?
Test runs on little endian and big endian platforms

Author: Pete Robbins <[email protected]>

Closes apache#15464 from robbinspg/SPARK-17827.
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
## What changes were proposed in this pull request?
correct the expected type from Length function to be Int

## How was this patch tested?
Test runs on little endian and big endian platforms

Author: Pete Robbins <[email protected]>

Closes apache#15464 from robbinspg/SPARK-17827.
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