Skip to content
Snippets Groups Projects
Commit 92b9c5ed authored by Alexander Slesarenko's avatar Alexander Slesarenko Committed by Reynold Xin
Browse files

[SPARK-6428][SQL] Removed unnecessary typecasts in MutableInt, MutableDouble etc.

marmbrus rxin I believe these typecasts are not required in the presence of explicit return types.

Author: Alexander Slesarenko <avslesarenko@gmail.com>

Closes #9262 from aslesarenko/remove-typecasts.
parent b67dc6a4
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ import org.apache.spark.unsafe.types.UTF8String
* val newCopy = new Mutable$tpe
* newCopy.isNull = isNull
* newCopy.value = value
* newCopy.asInstanceOf[this.type]
* newCopy
* }
* }"""
* }.foreach(println)
......@@ -78,7 +78,7 @@ final class MutableInt extends MutableValue {
val newCopy = new MutableInt
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableInt]
newCopy
}
}
......@@ -93,7 +93,7 @@ final class MutableFloat extends MutableValue {
val newCopy = new MutableFloat
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableFloat]
newCopy
}
}
......@@ -108,7 +108,7 @@ final class MutableBoolean extends MutableValue {
val newCopy = new MutableBoolean
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableBoolean]
newCopy
}
}
......@@ -123,7 +123,7 @@ final class MutableDouble extends MutableValue {
val newCopy = new MutableDouble
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableDouble]
newCopy
}
}
......@@ -138,7 +138,7 @@ final class MutableShort extends MutableValue {
val newCopy = new MutableShort
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableShort]
newCopy
}
}
......@@ -153,7 +153,7 @@ final class MutableLong extends MutableValue {
val newCopy = new MutableLong
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableLong]
newCopy
}
}
......@@ -168,7 +168,7 @@ final class MutableByte extends MutableValue {
val newCopy = new MutableByte
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableByte]
newCopy
}
}
......@@ -183,7 +183,7 @@ final class MutableAny extends MutableValue {
val newCopy = new MutableAny
newCopy.isNull = isNull
newCopy.value = value
newCopy.asInstanceOf[MutableAny]
newCopy
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment