Repository: spark
Updated Branches:
  refs/heads/master 62a826f17 -> 554adc77d


[SPARK-22595][SQL] fix flaky test: CastSuite.SPARK-22500: cast for struct 
should not generate codes beyond 64KB

## What changes were proposed in this pull request?

This PR reduces the number of fields in the test case of `CastSuite` to fix an 
issue that is pointed at 
[here](https://github.com/apache/spark/pull/19800#issuecomment-346634950).

```
java.lang.OutOfMemoryError: GC overhead limit exceeded
java.lang.OutOfMemoryError: GC overhead limit exceeded
        at org.codehaus.janino.UnitCompiler.findClass(UnitCompiler.java:10971)
        at 
org.codehaus.janino.UnitCompiler.findTypeByName(UnitCompiler.java:7607)
        at 
org.codehaus.janino.UnitCompiler.getReferenceType(UnitCompiler.java:5758)
        at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:5732)
        at org.codehaus.janino.UnitCompiler.access$13200(UnitCompiler.java:206)
        at 
org.codehaus.janino.UnitCompiler$18.visitReferenceType(UnitCompiler.java:5668)
        at 
org.codehaus.janino.UnitCompiler$18.visitReferenceType(UnitCompiler.java:5660)
        at org.codehaus.janino.Java$ReferenceType.accept(Java.java:3356)
        at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:5660)
        at 
org.codehaus.janino.UnitCompiler.buildLocalVariableMap(UnitCompiler.java:2892)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2764)
        at 
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1262)
        at 
org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1234)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:538)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:890)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:894)
        at org.codehaus.janino.UnitCompiler.access$600(UnitCompiler.java:206)
        at 
org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:377)
        at 
org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:369)
        at 
org.codehaus.janino.Java$MemberClassDeclaration.accept(Java.java:1128)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
        at 
org.codehaus.janino.UnitCompiler.compileDeclaredMemberTypes(UnitCompiler.java:1209)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:564)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:890)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:894)
        at org.codehaus.janino.UnitCompiler.access$600(UnitCompiler.java:206)
        at 
org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:377)
        at 
org.codehaus.janino.UnitCompiler$2.visitMemberClassDeclaration(UnitCompiler.java:369)
        at 
org.codehaus.janino.Java$MemberClassDeclaration.accept(Java.java:1128)
        at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:369)
        at 
org.codehaus.janino.UnitCompiler.compileDeclaredMemberTypes(UnitCompiler.java:1209)
        at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:564)
...
```

## How was this patch tested?

Used existing test case

Author: Kazuaki Ishizaki <ishiz...@jp.ibm.com>

Closes #19806 from kiszk/SPARK-22595.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/554adc77
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/554adc77
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/554adc77

Branch: refs/heads/master
Commit: 554adc77d24c411a6df6d38c596aa33cdf68f3c1
Parents: 62a826f
Author: Kazuaki Ishizaki <ishiz...@jp.ibm.com>
Authored: Fri Nov 24 12:08:49 2017 +0100
Committer: Wenchen Fan <wenc...@databricks.com>
Committed: Fri Nov 24 12:08:49 2017 +0100

----------------------------------------------------------------------
 .../org/apache/spark/sql/catalyst/expressions/CastSuite.scala      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/554adc77/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
----------------------------------------------------------------------
diff --git 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
index 84bd8b2..7837d65 100644
--- 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
+++ 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
@@ -829,7 +829,7 @@ class CastSuite extends SparkFunSuite with 
ExpressionEvalHelper {
   }
 
   test("SPARK-22500: cast for struct should not generate codes beyond 64KB") {
-    val N = 250
+    val N = 25
 
     val fromInner = new StructType(
       (1 to N).map(i => StructField(s"s$i", DoubleType)).toArray)


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

Reply via email to