Skip to content

[SPARK-17827][SQL]maxColLength type should be Int for String and Binary#15464

Closed
robbinspg wants to merge 1 commit intoapache:masterfrom
robbinspg:SPARK-17827
Closed

[SPARK-17827][SQL]maxColLength type should be Int for String and Binary#15464
robbinspg wants to merge 1 commit intoapache:masterfrom
robbinspg:SPARK-17827

Conversation

@robbinspg
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

wzhfy commented Oct 13, 2016

LGTM

@robbinspg
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Tests all pass on big-endian with this PR

@SparkQA
Copy link
Copy Markdown

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
Copy Markdown
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 <robbinspg@gmail.com>

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 <robbinspg@gmail.com>

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