File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/scala/org/apache/spark/sql/catalyst/expressions/codegen
test/scala/org/apache/spark/sql/catalyst/expressions/codegen Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ class CodeGenContext {
271271 * Splits the generated code of expressions into multiple functions, because function has
272272 * 64kb code size limit in JVM
273273 */
274- def splitExpressions (input : String , expressions : Seq [String ]): String = {
274+ def splitExpressions (row : String , expressions : Seq [String ]): String = {
275275 val blocks = new ArrayBuffer [String ]()
276276 val blockBuilder = new StringBuilder ()
277277 for (code <- expressions) {
@@ -292,15 +292,15 @@ class CodeGenContext {
292292 val functions = blocks.zipWithIndex.map { case (body, i) =>
293293 val name = s " ${apply}_ $i"
294294 val code = s """
295- |private void $name(InternalRow $input ) {
295+ |private void $name(InternalRow $row ) {
296296 | $body
297297 |}
298298 """ .stripMargin
299299 addNewFunction(name, code)
300300 name
301301 }
302302
303- functions.map(name => s " $name( $input ); " ).mkString(" \n " )
303+ functions.map(name => s " $name( $row ); " ).mkString(" \n " )
304304 }
305305 }
306306}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import org.apache.spark.unsafe.types.UTF8String
2929class GeneratedProjectionSuite extends SparkFunSuite {
3030
3131 test(" generated projections on wider table" ) {
32- val N = 10
32+ val N = 1000
3333 val wideRow1 = new GenericInternalRow ((1 to N ).toArray[Any ])
3434 val schema1 = StructType ((1 to N ).map(i => StructField (" " , IntegerType )))
3535 val wideRow2 = new GenericInternalRow (
You can’t perform that action at this time.
0 commit comments