From e5b89978edf7fa52090116b9b5b53ddaeef08beb Mon Sep 17 00:00:00 2001 From: Cheng Lian <lian@databricks.com> Date: Thu, 29 Oct 2015 11:34:54 +0800 Subject: [PATCH] [SPARK-11376][SQL] Removes duplicated `mutableRow` field This PR fixes a mistake in the code generated by `GenerateColumnAccessor`. Interestingly, although the code is illegal in Java (the class has two fields with the same name), Janino accepts it happily and accidentally works properly. Author: Cheng Lian <lian@databricks.com> Closes #9335 from liancheng/spark-11376.fix-generated-code. --- .../org/apache/spark/sql/columnar/GenerateColumnAccessor.scala | 2 -- 1 file changed, 2 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/columnar/GenerateColumnAccessor.scala b/sql/core/src/main/scala/org/apache/spark/sql/columnar/GenerateColumnAccessor.scala index d0f5bfa1cd..7980a6f36d 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/columnar/GenerateColumnAccessor.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/columnar/GenerateColumnAccessor.scala @@ -140,7 +140,6 @@ object GenerateColumnAccessor extends CodeGenerator[Seq[DataType], ColumnarItera private int numRowsInBatch = 0; private scala.collection.Iterator input = null; - private MutableRow mutableRow = null; private DataType[] columnTypes = null; private int[] columnIndexes = null; @@ -156,7 +155,6 @@ object GenerateColumnAccessor extends CodeGenerator[Seq[DataType], ColumnarItera public void initialize(Iterator input, DataType[] columnTypes, int[] columnIndexes) { this.input = input; - this.mutableRow = mutableRow; this.columnTypes = columnTypes; this.columnIndexes = columnIndexes; } -- GitLab