Skip to content

Commit f37fd69

Browse files
committed
Fixed review comments
1 parent 47f6365 commit f37fd69

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUdfs.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,8 @@ private[hive] case class HiveUdafFunction(
341341
} else {
342342
createFunction[AbstractGenericUDAFResolver]()
343343
}
344-
345344

346-
private val inspectors =
347-
if(isUDAFBridgeRequired) exprs.map(ex => toInspector(ex.dataType)).toArray
348-
else exprs.map(toInspector).toArray
345+
private val inspectors = exprs.map(toInspector).toArray
349346

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

369366
def update(input: Row): Unit = {
370367
val inputs = inputProjection(input).asInstanceOf[Seq[AnyRef]].toArray
371-
function.iterate(buffer, wrap(inputs,inspectors,cached))
368+
function.iterate(buffer, wrap(inputs, inspectors, cached))
372369
}
373370
}

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUdfSuite.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ class HiveUdfSuite extends QueryTest {
100100

101101
checkAnswer(sql("SELECT percentile_approx(100.0, array(0.9,0.9)) FROM src LIMIT 1"),
102102
sql("SELECT array(100,100) FROM src LIMIT 1").collect().toSeq)
103-
104-
TestHive.reset()
105103
}
106104

107105
test("UDFIntegerToString") {

0 commit comments

Comments
 (0)