Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ case class Average(child: Expression) extends PartialAggregate with trees.UnaryN

child.dataType match {
case DecimalType.Fixed(_, _) =>
// Turn the results to unlimited decimals for the divsion, before going back to fixed
// Turn the results to unlimited decimals for the division, before going back to fixed
val castedSum = Cast(Sum(partialSum.toAttribute), DecimalType.Unlimited)
val castedCount = Cast(Sum(partialCount.toAttribute), DecimalType.Unlimited)
SplitEvaluation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ object GenerateProjection extends CodeGenerator[Seq[Expression], Projection] {
val nullFunctions =
q"""
private[this] var nullBits = new Array[Boolean](${expressions.size})
final def setNullAt(i: Int) = { nullBits(i) = true }
final def isNullAt(i: Int) = nullBits(i)
override def setNullAt(i: Int) = { nullBits(i) = true }
override def isNullAt(i: Int) = nullBits(i)
""".children

val tupleElements = expressions.zipWithIndex.flatMap {
Expand Down Expand Up @@ -82,7 +82,7 @@ object GenerateProjection extends CodeGenerator[Seq[Expression], Projection] {
val iLit = ru.Literal(Constant(i))
q"if(isNullAt($iLit)) { null } else { ${newTermName(s"c$i")} }"
}
q"final def iterator = Iterator[Any](..$allColumns)"
q"override def iterator = Iterator[Any](..$allColumns)"
}

val accessorFailure = q"""scala.sys.error("Invalid ordinal:" + i)"""
Expand All @@ -94,7 +94,7 @@ object GenerateProjection extends CodeGenerator[Seq[Expression], Projection] {

q"if(i == $ordinal) { if(isNullAt($i)) return null else return $elementName }"
}
q"final def apply(i: Int): Any = { ..$cases; $accessorFailure }"
q"override def apply(i: Int): Any = { ..$cases; $accessorFailure }"
}

val updateFunction = {
Expand All @@ -114,7 +114,7 @@ object GenerateProjection extends CodeGenerator[Seq[Expression], Projection] {
return
}"""
}
q"final def update(i: Int, value: Any): Unit = { ..$cases; $accessorFailure }"
q"override def update(i: Int, value: Any): Unit = { ..$cases; $accessorFailure }"
}

val specificAccessorFunctions = NativeType.all.map { dataType =>
Expand All @@ -128,7 +128,7 @@ object GenerateProjection extends CodeGenerator[Seq[Expression], Projection] {
}

q"""
final def ${accessorForType(dataType)}(i: Int):${termForType(dataType)} = {
override def ${accessorForType(dataType)}(i: Int):${termForType(dataType)} = {
..$ifStatements;
$accessorFailure
}"""
Expand All @@ -145,7 +145,7 @@ object GenerateProjection extends CodeGenerator[Seq[Expression], Projection] {
}

q"""
final def ${mutatorForType(dataType)}(i: Int, value: ${termForType(dataType)}): Unit = {
override def ${mutatorForType(dataType)}(i: Int, value: ${termForType(dataType)}): Unit = {
..$ifStatements;
$accessorFailure
}"""
Expand Down Expand Up @@ -193,7 +193,7 @@ object GenerateProjection extends CodeGenerator[Seq[Expression], Projection] {

val copyFunction =
q"""
final def copy() = new $genericRowType(this.toArray)
override def copy() = new $genericRowType(this.toArray)
"""

val classBody =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ case class Coalesce(children: Seq[Expression]) extends Expression {
def dataType = if (resolved) {
children.head.dataType
} else {
throw new UnresolvedException(this, "Coalesce cannot have children of different types.")
val childTypes = children.map(c => s"$c: ${c.dataType}").mkString(", ")
throw new UnresolvedException(
this, s"Coalesce cannot have children of different types. $childTypes")
}

override def eval(input: Row): Any = {
Expand Down