Github user wzhfy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19506#discussion_r146100286
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproxCountDistinctForIntervals.scala
 ---
    @@ -239,4 +221,23 @@ case class ApproxCountDistinctForIntervals(
       override def dataType: DataType = ArrayType(LongType)
     
       override def prettyName: String = "approx_count_distinct_for_intervals"
    +
    +  override def serialize(obj: Array[Long]): Array[Byte] = {
    +    val buffer = ByteBuffer.wrap(new Array(obj.length * Longs.BYTES))
    --- End diff --
    
    Changed to unsafe writing, could you take another look?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to