[GitHub] spark pull request #15464: [SPARK-17827][SQL]maxColLength type should be Int...

2016-10-13 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/15464


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #15464: [SPARK-17827][SQL]maxColLength type should be Int...

2016-10-13 Thread wzhfy
Github user wzhfy commented on a diff in the pull request:

https://github.com/apache/spark/pull/15464#discussion_r83219244
  
--- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/StatisticsColumnSuite.scala ---
@@ -150,7 +150,7 @@ class StatisticsColumnSuite extends StatisticsTest {
   val colStat = ColumnStat(InternalRow(
 values.count(_.isEmpty).toLong,
 nonNullValues.map(_.length).sum / nonNullValues.length.toDouble,
-nonNullValues.map(_.length).max.toLong,
+nonNullValues.map(_.length).max.toInt,
--- End diff --

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #15464: [SPARK-17827][SQL]maxColLength type should be Int...

2016-10-13 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/15464#discussion_r83214509
  
--- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/StatisticsColumnSuite.scala ---
@@ -150,7 +150,7 @@ class StatisticsColumnSuite extends StatisticsTest {
   val colStat = ColumnStat(InternalRow(
 values.count(_.isEmpty).toLong,
 nonNullValues.map(_.length).sum / nonNullValues.length.toDouble,
-nonNullValues.map(_.length).max.toLong,
+nonNullValues.map(_.length).max.toInt,
--- End diff --

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #15464: [SPARK-17827][SQL]maxColLength type should be Int...

2016-10-13 Thread robbinspg
GitHub user robbinspg opened a pull request:

https://github.com/apache/spark/pull/15464

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

## 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


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/robbinspg/spark-1 SPARK-17827

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/15464.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #15464


commit 559c3b905bb4a95e880051a7066438705bb1ecfd
Author: Pete Robbins 
Date:   2016-10-13T12:58:40Z

Max length returns an Int for String and binary




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org