Github user sarutak commented on a diff in the pull request:
https://github.com/apache/spark/pull/10562#discussion_r48698010
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
---
@@ -2028,4 +2028,18 @@ class SQLQuerySuite extends QueryTest with
SharedSQLContext {
Row(false) :: Row(true) :: Nil)
}
+ test("SPARK-12340: overstep the bounds of Int in SparkPlan.executeTake"){
+ val rdd = sqlContext.sparkContext.parallelize(1 to 3 , 3 )
+
+ rdd.toDF("key").registerTempTable("spark12340")
+ checkAnswer(
+ sql("select key from spark12340 limit 2147483638"),
+ Row(1) :: Row(2) :: Row(3) :: Nil
+ )
+
+ assert(rdd.take(2147483638).size === 3)
+
+ assert(rdd.takeAsync(2147483638).get.size === 3)
--- End diff --
Does this test case pass the compilation? `2147483638` is not within the
range of `Int`.
Should we say `Int.MaxValue` ?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]