Skip to content

Commit

Permalink
Fixed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gvramana committed Nov 22, 2014
1 parent 47f6365 commit f37fd69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,8 @@ private[hive] case class HiveUdafFunction(
} else {
createFunction[AbstractGenericUDAFResolver]()
}


private val inspectors =
if(isUDAFBridgeRequired) exprs.map(ex => toInspector(ex.dataType)).toArray
else exprs.map(toInspector).toArray
private val inspectors = exprs.map(toInspector).toArray

private val function = {
val parameterInfo = new SimpleGenericUDAFParameterInfo(inspectors,false,false)
Expand All @@ -368,6 +365,6 @@ private[hive] case class HiveUdafFunction(

def update(input: Row): Unit = {
val inputs = inputProjection(input).asInstanceOf[Seq[AnyRef]].toArray
function.iterate(buffer, wrap(inputs,inspectors,cached))
function.iterate(buffer, wrap(inputs, inspectors, cached))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ class HiveUdfSuite extends QueryTest {

checkAnswer(sql("SELECT percentile_approx(100.0, array(0.9,0.9)) FROM src LIMIT 1"),
sql("SELECT array(100,100) FROM src LIMIT 1").collect().toSeq)

TestHive.reset()
}

test("UDFIntegerToString") {
Expand Down

0 comments on commit f37fd69

Please sign in to comment.