diff options
author | Kazuaki Ishizaki <ishizaki@jp.ibm.com> | 2016-04-01 22:38:07 -0700 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2016-04-01 22:38:07 -0700 |
commit | 877dc712e66db69cb320e10ba5edebca401591e3 (patch) | |
tree | c9eb4a9903d60a1c47e4f64d461bbf269e34f203 /sql/core/src/test/scala/org/apache | |
parent | 27e71a2cd930ae28c82c9c3ee6476a12ea165fdf (diff) | |
download | spark-877dc712e66db69cb320e10ba5edebca401591e3.tar.gz spark-877dc712e66db69cb320e10ba5edebca401591e3.tar.bz2 spark-877dc712e66db69cb320e10ba5edebca401591e3.zip |
[SPARK-14138] [SQL] [MASTER] Fix generated SpecificColumnarIterator code can exceed JVM size limit for cached DataFrames
## What changes were proposed in this pull request?
This PR reduces Java byte code size of method in ```SpecificColumnarIterator``` by using a approach to make a group for lot of ```ColumnAccessor``` instantiations or method calls (more than 200) into a method
## How was this patch tested?
Added a new unit test, which includes large instantiations and method calls, to ```InMemoryColumnarQuerySuite```
Author: Kazuaki Ishizaki <ishizaki@jp.ibm.com>
Closes #12108 from kiszk/SPARK-14138-master.
Diffstat (limited to 'sql/core/src/test/scala/org/apache')
-rw-r--r-- | sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala index 9e04caf8ba..50c8745a28 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala @@ -220,4 +220,14 @@ class InMemoryColumnarQuerySuite extends QueryTest with SharedSQLContext { assert(data.count() === 10) assert(data.filter($"s" === "3").count() === 1) } + + test("SPARK-14138: Generated SpecificColumnarIterator can exceed JVM size limit for cached DF") { + val length1 = 3999 + val columnTypes1 = List.fill(length1)(IntegerType) + val columnarIterator1 = GenerateColumnAccessor.generate(columnTypes1) + + val length2 = 10000 + val columnTypes2 = List.fill(length2)(IntegerType) + val columnarIterator2 = GenerateColumnAccessor.generate(columnTypes2) + } } |