Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/17028#discussion_r102679493
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/aggregate/PercentileSuite.scala
---
@@ -39,44 +38,44 @@ class PercentileSuite extends SparkFunSuite {
val agg = new Percentile(BoundReference(0, IntegerType, true),
Literal(0.5))
// Check empty serialize and deserialize
- val buffer = new OpenHashMap[Number, Long]()
+ val buffer = new OpenHashMap[AnyRef, Long]()
assert(compareEquals(agg.deserialize(agg.serialize(buffer)), buffer))
// Check non-empty buffer serializa and deserialize.
data.foreach { key =>
- buffer.changeValue(key, 1L, _ + 1L)
+ buffer.changeValue(new Integer(key), 1L, _ + 1L)
}
assert(compareEquals(agg.deserialize(agg.serialize(buffer)), buffer))
}
test("class Percentile, high level interface, update, merge, eval...") {
val count = 10000
val percentages = Seq(0, 0.25, 0.5, 0.75, 1)
- val expectedPercentiles = Seq(1, 2500.75, 5000.5, 7500.25, 10000)
+ val expectedPercentiles = Seq[Double](1, 2500.75, 5000.5, 7500.25,
10000)
--- End diff --
Since my Intellij makes an alert on this part, I added this. But, you're
right and this is not necessary. I reverted this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]