Skip to content

Commit

Permalink
Code style cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed Apr 11, 2014
1 parent 99382bf commit 32cc9ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUdfs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ trait HiveFunctionFactory {
}
}

abstract class HiveUdf
extends Expression with Logging with HiveFunctionFactory {
abstract class HiveUdf extends Expression with Logging with HiveFunctionFactory {
self: Product =>

type UDFType
Expand All @@ -146,7 +145,7 @@ abstract class HiveUdf
lazy val functionInfo = getFunctionInfo(name)
lazy val function = createFunction[UDFType](name)

override def toString = s"${nodeName}#${functionInfo.getDisplayName}(${children.mkString(",")})"
override def toString = s"$nodeName#${functionInfo.getDisplayName}(${children.mkString(",")})"
}

case class HiveSimpleUdf(name: String, children: Seq[Expression]) extends HiveUdf {
Expand Down Expand Up @@ -202,10 +201,11 @@ case class HiveSimpleUdf(name: String, children: Seq[Expression]) extends HiveUd
}
}

case class HiveGenericUdf(
name: String,
children: Seq[Expression]) extends HiveUdf with HiveInspectors {
case class HiveGenericUdf(name: String, children: Seq[Expression])
extends HiveUdf with HiveInspectors {

import org.apache.hadoop.hive.ql.udf.generic.GenericUDF._

type UDFType = GenericUDF

@transient
Expand Down Expand Up @@ -357,7 +357,7 @@ case class HiveGenericUdaf(

override def toString = s"$nodeName#$name(${children.mkString(",")})"

def newInstance = new HiveUdafFunction(name, children, this)
def newInstance() = new HiveUdafFunction(name, children, this)
}

/**
Expand Down Expand Up @@ -435,7 +435,7 @@ case class HiveGenericUdtf(
}
}

override def toString() = s"$nodeName#$name(${children.mkString(",")})"
override def toString = s"$nodeName#$name(${children.mkString(",")})"
}

case class HiveUdafFunction(
Expand Down

0 comments on commit 32cc9ce

Please sign in to comment.